Diving further into using desktop Linux, you may find there may be times that you will need to run a command via the command line interface. That’s where a terminal emulator (pseudo terminal slave a.k.a. pts) comes into play in whatever Desktop Environment you choose to use. For Gnome there is Gnome Terminal, for KDE there is Konsole, and Xfce has the Xfce Terminal Emulator. Xterm is a standard terminal emulator for X Windows System that is one of the first terminal emulators you can still find in most Linux distributions today.
You can also access a direct terminal within a desktop environment by selecting the keyboard shortcut ctrl+alt+F3 through F6 (in most cases). This is commonly known as a virtual terminal (Teletypewriter a.k.a. tty). This system console you will also use if you decide to use Linux in headless mode without a desktop environment or window manager.
You will notice that when you open a terminal emulator or virtual terminal that you will be presented with the default shell that most Linux distributions use, the bash shell, or bourne again shell. However, you are not limited to this shell. If you choose, you can also install and use Korn shell (ksh) and Z shell (zsh), two of the commonly used shells amongst Linux enthusiast. Another shell, not mentioned in my presentation, that has dramatically grown in popularity is the fish shell (friendly interactive shell).
When using the command line, it is important to note that with most commands comes the ability to invoke some help and guidance when you need more information with that command. For example, when you want to list the contents of a directory you would type the ls command. But there may be times that you want a long listing of the directory (ls -l) or want to view hidden files (ls -la). To view the help of a command simply start typing the command, ls, then type –help thereafter, ls –help.
The man pages (manual pages) are another way to view additional information on commands by typing: man ls. Personally, I’m not a big fan of the man pages as most of the time they are pretty vague. I’ve often thought that it would be good if they included examples, and in very rare cases you may find examples. However, I will admit the man pages have been pretty helpful at times.
For more comprehensive information on a command, use info with a command: info ls. Using info will display, sometimes, pages and pages of incredibly using information. And a lot of the time will give you examples of how to use that command.
One incredibly useful tip for the command line that I don’t have listed in the presentation is tab completion. I, personally, can’t live without this tool, especially while navigating directories. While at the prompt when you start typing, hit the tab button once or twice for command or directory completion. However, be aware when attempting to type a command by hitting the tab twice sometimes you may have more than you want, it can be a screen full of information. But, when navigating directories, especially when you dive in deep, hitting that tab button twice is a very incredibly useful way of completing a long directory without having to type it out in full.
I will continue this discussion in upcoming parts so stay tuned. If you have any questions, please post them in the comments below or send me an email by visiting the About page.