Start using the command-line interface (cli)
Read Introduction to the command line
You can start by reading the book Introduction to the command line published under a copyleft license1. You can find a pdf copy of this book hosted on this website: https://yctct.com/command-line-gnu.pdf
At times, I have kept a printed copy on my desk for everyday usage; I find that consulting this book provides me with more reliable and in-depth answers than searching the web.
Use man
You can also use man. man is short for system’s manual pager. Most programs available on the command-line have a man page.
You can display a man page in your terminal by running:
$ man name_of_the_program
for example:
$ man ls
will display the man page of the command ls.
When the man page is displayed, you can:
- navigate a man page using the keys
jandkto go down and up, respectively. - search a man page for a keyword by typing
/keyword. - quit a man page by pressing the key
q.
Man pages are a bit dry to read at first, but one gets use to it. It is worth it; most of what you need will be in there. Look at the Example section of man pages (usually at the bottom of a man page). Over time, I have found that it is more efficient and reliable to consult man pages than searching the web.
You do not need to download man pages. Man pages are already on your operating system.
What if you are seeking to do a task from the command line but don’t know which program to use or even whether a program exists to do such a task? Use the program named apropos to find programs you need.
Use apropos
Use apropos to find programs you need on your computer.
There are already many programs installed on your computer. You can find the ones you need by running:
$ apropos keyword
for example, if you are looking for a program to list all the USB devices mounted on your computer you can run:
$ apropos usb
It should list the name of all programs which keyword usb is in the description of the man page. In the list, you should lsusb. This utility can list all USB devices mounted.
That is it.
You can see some of the programs I use on the command line there: https://yctct.com/log#programs
GNU Free Documentation License, see page 163 of the book.↩︎
command-line interface (cli) learn gnu linux personal computing start using wiki office applications shell literacy offline publishing