The Linux command line can seem impenetrable, with arcane instructions and a focus on text interfaces. Fortunately, there are many resources and tools to help you get started.
Customize your terminal to adapt it to your needs
Make the terminal feel like home
The first thing you should do is make your learning environment as comfortable as possible. You don’t want to spend too much time tweaking every last setting, but getting the basics right can make everything that follows go a little smoother.
The configuration will vary depending on your distribution, but things to keep in mind include:
-
Light/Dark Mode: Choose the mode in which you feel most comfortable reading the text.
-
Font: You’ll want to use something monospaced with clear differences between similar characters, for example, “0” (zero) and “O” (uppercase “oh”).
-
Whether to open new terminals in tabs or windows.
You will also want to know how use keyboard shortcuts since 99% of your work on the command line will involve typing. Don’t be afraid to open multiple terminal windows (or tabs) to run commands simultaneously and organize your tasks.
Customize your shell to your liking
Readability is key
Once you’ve customized your terminal app, you need to make a couple of small changes to your shell. This is typically bash, though you can change it to an alternative shell, like fish or zsh.
One of the best quick updates you can do is personalize your messagethe text that your shell displays at the beginning of each line. The default is pretty useful, but you can make it more useful for learning Linux. I like to use this configuration:
export PS1="\n(\$PWD) \$ "
This will remove things like your username and host, which you probably don’t care about when starting out. It also shows the full path of your current directory instead of just its name, making it easy to see your current location at a glance:
You can make this setting permanent by adding it to your .bashrc (or similar) file. That file is also a great place to configure aliases, which act as shortcuts for commands. If you find it difficult to remember the name of a command or its most useful default options, set an alias, e.g.
alias list='ls -l'
Learn all about man commands (and alternatives)
Man pages are your best friends.
Each command you’ll need to learn has built-in documentation that you can read using man tool. These “man pages” explain what a command does, different modes of operation, what files it requires, etc.
The man pages are comprehensive, but can be a little overwhelming, especially when you’re getting to know the system. Fortunately, there are alternatives.
Each command will usually support a -h or –help option, which explains how to use it in a simpler way:
He The tldr tool condenses long man pages in more manageable summaries. Here’s a comparison of a classic man page on the left with the tldr equivalent on the right:
tldr displays minimal information, followed by clear examples of the most common uses of each command. You can install it using your system’s package manager. If you just want to try tldr out, your web interface is excellent:
Find the commands you need with apropos
Teach yourself to fish
Linux commands often have short, abbreviated names for historical reasons. It can be difficult to remember the “chown” of “sudo.”
First, try exploring the directories listed on your PATH variable. These will contain programs that you can run on the command line. Run:
echo $PATH
That shows a set of directories with a colon (:) between them. Then run:
ls dirname
This will display the contents of one of these directories. And the files that appear are executable commands that you can run:
If you’re still having trouble identifying a command, try apropos, a man page search tool. Use it when you’re looking for a specific command, but aren’t sure what it’s called. Simply run:
apropos keyword
That will search for a keyword and see relevant man pages.
Check out these excellent and accessible resources
Don’t do it alone!
For more information, there are many online resources that you can check out for free. Find a trusted source that suits your level of experience and discuss everything they have to offer.
The Linux Command Line for Beginners It guides you from the beginning, covering all the basics you will need when starting out. It’s aimed at Ubuntu users, but if you can open a terminal you’ll be able to follow along.
Journey to Linux: Command Line provides a brief overview of the most important commands, with associated exercises and interactive test questions.
Linux command line for you and me It has everything from absolute beginners to more advanced users, so go through it from start to finish if you want to become an expert. It is also very useful as a reference source.
This Linux Tutorial by Ryans Tutorials explains the core concepts with many interesting aspects, tips and insights. It presents many diverse examples that help explain how the command line works.
Dive deeper into the Linux Documentation Project manuals
Get the official guidance you need
He PLD is a long-standing initiative to create free, quality documentation on all things Linux. As such, it offers a lot of dark and illuminating material, not all of which is useful for beginners.
However, there are still some excellent sources of information out there, if you’re willing to overlook the old-school presentation.
GNU/Linux Command Line Tools Summary It covers all types of built-in commands and how to use the command line. It also shows examples on how to execute many of them.
Beginner’s Guide to Bash explains the details of the bash shell, how it handles its commands, and how you can write your own scripts.
Continue learning with the help of How-To Geek
We have a wide selection of articles about Linux, for beginners and more advanced users. Several of them are already linked in this article, but here are a few others you’ll find…





