Introduction to shell for Beginners
The shell is one of the best methods for advanced management of your SuperX or any GNU/Linux based operating system. A shell is a command interpreter that interprets commands typed through the keyboard. SuperX offers a lot of choices when it comes to shells and the default on is Bash (Bourne Again SHell).
Launching a Shell
Launching the shell is easy. All you need to do is open the application launcher and click Konsole. You shall be presented with a prompt(usually represented with the $ sign) where you can type in some command.
Directory browsing through command line is easy and essential. To be able to do that we have the Unix command cd. It works as:
$ cd <path/to/directory>
where, <path/to/directory> is the name of the directory you want to switch to.
$ cd /etc
You can always print the name of the present working directory in the shell:
Absolute and Relative Paths
The concept of absolute and relative paths might help to better understand how directory browsing can be performed within the shell.
Any path that starts with the '/' (without the quotes) sign indicates an absolute path. In other words we can say that, an absolute path is a complete path starting from the beginning of the actual filesystem from the '/' directory.
/etc /home /etc/X11 /usr/share/applications
All in the above example are absolute paths.
Relative path is defined as path related to the present working directory. Suppose you are inside the '/home' directory and within this directory there is a sub-directory named 'superx_user'. Also within the 'superx_user' directory there is another sub-directory named 'Documents'. The relative path of the 'Documents' directory with respect to '/home' would be:
Note: The path does not start with a '/' sign.
One can jump to the user home directory (indicated by the '~/' sign in Unix or Linux shells):
$ cd ~/
Go to any sub-directory (ex. Documents) under the user home (~/) directory:
$ cd ~/Documents
Go back to the parent directory:
$ cd ..
Jump to the previous directory:
$ cd -
The following command will let you remain in the same directory:
$ cd .
Try these examples in the shell and see what happens.