Clark Computer Services

A Simple Beginner’s Guide to Shell Commands in Windows

A Beginner's Guide to Shell Commands

Sydney's seminar

Many people don’t know how Shell Commands work in Windows, and the prospect of using this feature can be intimidating for those who do. In this blog, I want to help you get started using Shell Commands, so you can see just how useful they are.

When you open up and use your computer, the typical user navigates the computer’s GUI or Graphical User Interface. These are all the text, icons, applications, and images that you see and use every day. Behind the visuals, though, is a constant stream of code running the computer. By using some of this code, rather than the GUI, you have a much more efficient way to work with and control the computer.

In this guide, I’ll go through the most basic commands you can use through the Command Shell.

A Beginner's Guide to Shell Commands | Sydney's Seminar | A Beginner's Guide to Shell Commands | Sydney's Seminar | A Beginner's Guide to Shell Commands Sydney's Seminar image of laptop with coding on it.

COMMAND SHELL           

To issue commands to a computer, you need to access the shell. A shell is a computer program that exposes OS Services to the user or other programs. Accessing the shell is easy through the Command Prompt. There are many ways to open the Command Prompt, but the easiest way is to open the Start menu, type in the “cmd” into the search field, and hit enter.

A Beginner's Guide to Shell Commands | Sydney's Seminar | A Beginner's Guide to Shell Commands | Sydney's Seminar | A Beginner's Guide to Shell Commands Sydney's Seminar image of DIR code.

LISTING ALL FILES IN A DIRECTORY

One of the most useful commands you can use displays all the folders in the current directory. The directory is the file system on your PC where all data is stored. To access this, type “dir” into the Command Prompt and click Enter. This will provide a list of all of the root folders on your main drive.

CHANGING DIRECTORIES

While it is nice to see all your root folders with dir, you can take it a step further and see all the files within a specific root folder by changing directories. To direct the Command Prompt to a new directory, type in “cd directory_name” and click Enter. Once you’re in the new directory, you can use the dir command again to view all the folders in this file. If you want to go back, type cd..” and it will take you to the previous directory.

LISTING ALL FILES IN A DIRECTORY

One of the most useful commands you can use displays all the folders in the current directory. The directory is the file system on your PC where all data is stored. To access this, type “dir” into the Command Prompt and click Enter. This will provide a list of all of the root folders on your main drive.

CHANGING DIRECTORIES

While it is nice to see all your root folders with dir, you can take it a step further and see all the files within a specific root folder by changing directories. To direct the Command Prompt to a new directory, type in “cd directory_name” and click Enter. Once you’re in the new directory, you can use the dir command again to view all the folders in this file. If you want to go back, type cd..” and it will take you to the previous directory.

CREATING A NEW DIRECTORY

Should you want to create a new root folder, you can simply type in “mkdir directory_name” and click Enter. Afterward, you can use the dir command again, and you’ll see your new root folder in the displayed list. It is important to note, though, that you cannot have spaces in the file name. Always use the underscore if you want to separate words, as putting a space will create two separate folders. Of course, this is a great timesaver if you want to create several new folders simultaneously.

CLEARING THE SHELL SCREEN

If you’ve been following along this guide by running the commands, I’m sure you noticed that the shell screen gets clogged up with information very quickly. Luckily, there is an easy command for cleaning up your screen! All you need to do is type “cls” and click Enter. This command clears all your work and gives you a fresh screen on which to work.

A Beginner's Guide to Shell Commands | Sydney's Seminar | A Beginner's Guide to Shell Commands | Sydney's Seminar | A Beginner's Guide to Shell Commands Sydney's Seminar image of CMD screen.

While there are over 280 commands for the Windows operating system, the ones discussed in this blog are a great starting point for getting your toes wet in the world of the Command Prompt.

If you have any difficulties using Command Prompt or need someone with a more advanced understanding of Power Shell, just contact CLARK. Either give us a call at 301-456-6931 or email support@clarkcomputerservices.com, and our five-star team will be happy to help with any tech issues you are facing.

5 1 vote
Rate This Post
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x