With this article, we will be getting a little more familiar with command line which will be of great use if you would like to learn to navigate your operating system in a more efficient way.
Get acquainted with the idea of directories
The very first thing you should know is that, no matter which shell you use, command prompt will always work with specific folder. This is called directory.
So, command prompt will always work with specific and working directory. Your operating system will then execute all kind of commands inside that specific directory. You are not stuck with one directory. Various commands apply to every directory and you can change the directory from the command line.
Changing your directory on different systems
Here is an example of a specified working directory in the command prompt that will look something like this: C: \>
This is saying that we are not at the root directory of the Windows called C. And as for the Linux and macOS users, the command prompt works the same way functionality wise but directory works differently. This is so, because, for macOS and Linux operating systems, the drives are mounted as folders and not as drive letters like windows drives which we are all typically familiar with- E, D, C etc.
Also, you will notice that the Linux also shows the currently logged in user along with the current directory.
Another difference will be noticeable, that is the use of forward slash “/” instead of backward slash like “\”.
These subtle differences are what differs from the windows shell along with some commands.
Remember one thing that, it is a good practice to start with the root of any directory and navigate your way to wherever you want to dig in.
Precision of Command Line: working with file formats and file naming
If you are to work in command line, you have to be super precise! As for the GUI users, we navigate and open a file with a file extension. These file extensions help operating system identify the format of the file and help you and itself to interact with this file accordingly.
This uniqueness of each file format prevent other file from running or reading another file. This is tremendously crucial for file organisation. The naming convention is pretty straightforward. Filename and extension divided by a dot (.).
Command line is also case and white space sensitive, meaning you need to be careful about the capital or small case letter as well as the white space between word or command. Remember that the file name and its format is super important for any operating system. Based on this piece of information, operating system decide which program use this file and use it accordingly. This is called file association.
You can always change the file association to any other programs you desire. For example, if you want to open up your .MP4 format from default windows Movies & TV to VLC media player, you just have to go the properties of such file, by right clicking on it of course, and hit the change button. With this you will be prompted with another box and point it towards your desired program and click OK, apply and OK. Note that without the file extension the operating system will not know what kind of program it is and will leave blank as long as you do not define the extension.