Last Updated on May 22, 2022
External Commands
External commands are independent of the shell. Like other programs, the shell executes external programs by looking them up in the executable search path. The PATH environment variable contains a colon-separated list of directories to search for programs.
Even a vanilla Ubuntu installation comes supplied with hundreds of external commands. Many of them are terminal-based and represent cornerstone commands that let you manage the filesystem, monitor the system, develop software, improve your productivity, manipulate data, install/remove software, and much more.
Of course, you can run GUI apps from the shell. In many cases, GUI apps are merely a frontend to a command-line interface. To start some GUI apps, the name might not be immediately obvious. For example, to start the program shown as Terminal in the Dash, you need to type gnome-terminal in the shell.
There’s way too many external commands to cover here. We’ll cover the most useful in a later article in this series.
A man page (short for manual page) is a form of software documentation. External commands usually have a man page. They provide a description about the software together with available options. Here’s an extract from the manual page for whereis.
$ man whereis
There are other help-related tools such as whatis
which provides a brief description of an external command. If you try whatis
with a shell builtin you’ll get the response “nothing appropriate”; whatis is only helpful for external commands.
Redirect error and output messages to /dev/null
When we run a command from the shell error and output messages will appear in the terminal. While they can be very useful in diagnosing any problems, you may wish to suppress them.
>/dev/null
redirects the command standard output to the null device, which is a special device which discards the information written to it.
$ command >/dev/null 2>&1
For example, we can start Rhythmbox from the terminal and suppress its error and output messages with the command:
$ rhythmbox >/dev/null 2>&1
We can place Rhythmbox in the background to allow us to continue using the shell by appending the & character to the above command.
$ rhythmbox >/dev/null 2>&1 &
Page 5 – Navigate the shell efficiently
Pages in this article:
Page 1 – Types of Commands
Page 2 – Shell Builtins
Page 3 – Aliases
Page 4 – External Commands
Page 5 – Navigate the shell efficiently
Page 6 – Appendix – Explanation of Shell Builtins
All articles in this series:
This is for beginners? Every other word seems undefined. I can read Supreme Court briefs and medical research but not this! The most important thing unexplained is what can be accomplished with these commands. If someone is willing to talk to me to explain these things, I am willing to suggest easier explanations.
Every other word seems undefined?? I think you should read more of the guide before coming to your discourteous comment.
You’ll learn a lot from Part 11, as that shows you how to find what you can do with the commands.
Well, I have not figured out just who you all really are yet….. maybe I won’t be able to>?. But, this is the best “Everything About Linux” I have ever found, on the Internet! And I have been doing Linux in many flavors from 1994! Mostly, I go between Debian and Kubuntu, which I use because of the KDE desktop, which I really like, works great for me to do anything I need!
Wow….. I now have a place to send those I try to talk into using Linux and out of paying that expensive Microsoft tax. I bailed out of Microsoft Windows 95SE in 94′. Furthermore, I have never looked back, and I have kept my money to donate to the many parts of Linux that don’t fly the “Blue Screen Of Death” for a fortune.
Don’t go away anytime soon, I’m going to work even harder now to talk others into dumping Windoz!