The Beginners’ Guide to Using the Linux Terminal

Feature Image How To Use Terminal On Linux Guide

Like any Linux beginner, I felt a bit intimidated by the Linux Terminal when I first switched to Linux. However, as I began exploring and learning some basic terminal commands, things started to change. Now, I can easily automate tasks, manage files with lightning speed, and install software directly from the terminal. The truth is, using the Linux terminal is not as scary as it seems. Here we show you how to get started using the Linux terminal.

Introducing the Linux Terminal

The Terminal (also known as the command-line interface, shell, or CLI) is essentially your direct line of communication with your Linux system. It serves as the command center of your operating system, providing a text-based interface that enables you to type commands, execute scripts, and manage your system efficiently.

Getting Started With the Linux Terminal

So, how do you access the Linux Terminal? It depends slightly on your Linux distribution (such as Ubuntu, Fedora, or Mint), but generally, you can find it in your Applications menu. Look for something labelled Terminal, Console, or Xterm, or simply use a keyboard shortcut like Ctrl + Alt + T.

Opening Terminal on Ubuntu from Applications menu.

Once you open it, you’ll see a black screen (usually, though it can be customized) with a blinking cursor. This is your prompt, where you’ll execute your Linux commands. It typically looks something like this:

Displaying Terminal Window On Ubuntu.

Here, user@computer:~$ (haroon@Ubuntu:~$) indicates your username (haroon), your computer’s name (Ubuntu), and your current directory (~, which is your home directory). Also, the $ sign means the terminal is ready for your commands.

Let’s try something simple. Type echo "Welcome to MTE!" command in your terminal and press Enter:

Displaying output of the echo command on Ubuntu terminal.

This is a basic command that outputs text to the screen.

Remember, the Terminal is case-sensitive, so Hello and hello are treated as different inputs. Additionally, spaces matter. If you type a command incorrectly, the Terminal won’t sugarcoat it – it’ll simply throw an error.

Setting Up and Customizing Your Linux Terminal

While the default terminal setup is functional, you can tweak its look and feel to align with your style. For instance, you can modify the terminal fonts, colors, and even the prompt itself. Most Linux distributions come with built-in customization options.

For instance, on Ubuntu, you can right-click inside the Terminal window, select Preferences, and tweak everything from fonts to colors.

Ubuntu Terminal Preferences Window

In the customization window, you can also transition between dark and light themes depending on your preference. Simply look for the Appearance or Colors section to select or create your desired theme.

Some terminal emulators even allow you to adjust the background transparency, giving your terminal a sleek look. In the preferences, under the Colors section, you’ll find a transparency slider to adjust the opacity to your liking.

Modifying transparency of the terminal Background of Ubuntu terminal.

Understanding the Basics Commands

Now that you know how to open and use the Terminal, let’s dive into some basic commands that will help you navigate and manage your system. In Linux, different commands serve different purposes.

For example, one of the most common tasks I perform in the Terminal is navigating through files and folders. If you want to jump to a specific directory, use the cd command with the directory name:

cd Documents

When working in a nested directory, you might want to know your present destination in the file system. For this, use the pwd command, which stands for Print Working Directory:

pwd

To view all the files and folders in your currently opened location, use the ls command:

ls

Besides navigating, you can also create a new empty file using the touch command followed by the filename:

touch filename.txt

Need to create a new folder? Execute mkdir along with a folder named:

mkdir Projects

After creating files or folders, you can delete them using the rm command followed by the file or folder name:

rm oldfile.txt

You can also use cp to copy a file or directory, and mv to move or rename a file or directory.

Another task I love performing in the Terminal is viewing file contents or searching within files using Linux commands or terminal-based editors. Let’s display the entire content of a file with the cat:

cat filename.txt

Beyond file management, there are various Linux commands for tasks like process management, checking disk usage, networking, and displaying system information. There are also commands for package management, which you can use to remove, update, or install software packages.

These are just the basics, but they’re enough to get you started. You can make use of our Linux command line cheatsheet to help you master the commonly used commands. As you practice, you’ll discover more commands and shortcuts that make your life easier.

Use TLDR or Man Pages for Help

Let’s say you’re trying to use a command, but you’re not sure how it works. What do you do? Don’t worry – you don’t need to go anywhere. You can get detailed and simplified explanations of any command right in the Terminal using the man and tldr commands.

The first one, man (short for manual), shows the manual page for a command. It provides a detailed explanation, including all its options, examples, and definitions.

For instance, running man ls will show you all the options and details for the ls command.

Showing Manual Pages Of ls Command.

While man pages are comprehensive, they can sometimes be overwhelming for beginners. Enter TLDR (Too Long; Didn’t Read). It’s a simplified version of man pages that gives you quick examples and concise definitions of the requested command. You’ll need to install it with your default package manager, such as using APT on Ubuntu:

sudo apt install tldr

Then, simply type tldr followed by the command:

tldr ls
Showing Concise Explanation of the ls command With Tldr.

You’ll get a cheat sheet with practical examples.

Websites and YouTube Channels to Learn Linux

Learning Linux doesn’t have to be intimidating, especially with the wide range of online resources available today. If you’re a beginner, YouTube is a fantastic place to start. Channels like The Linux Experiment and Learn Linux TV offer beginner-friendly tutorials, ranging from basic commands to advanced topics like server management. I personally found introductory videos incredibly helpful when I first started. It’s like having a virtual tutor guide you through the basics.

If you prefer interactive websites, platforms like Linux Journey and OverTheWire are excellent choices. Linux Journey breaks down Linux concepts into bite-sized lessons with quizzes, while OverTheWire gamifies learning with challenges like Bandit, where you solve puzzles using Linux commands. Both platforms are beginner-friendly and make learning fun and engaging.

For those who enjoy a mix of tutorials and community-driven content, YouTube channels like DistroTube and Chris Titus Tech offer practical tips, distro reviews, and Linux news.

Browse Through Our Linux Section

If you’re looking for more tips, tricks, and tutorials, check out our Linux section. We’ve got articles on a wide range of topics, from simple newbie guides to highly complex tutorials. Additionally, there are several beginner-friendly articles already linked in this guide, but here are a few more you might find helpful:

Alternatives to the Default Terminal

While the default Terminal is perfectly fine for most tasks, there are alternatives that offer enhanced features and customization options. Some popular choices include Terminator, Guake, Konsole, and Alacritty. Each of these terminals has unique features and specifications.

For example, Guake is a drop-down terminal that emerges from the top of the screen, similar to the Quake console. Meanwhile, terminals like Alacritty provide a GPU-accelerated terminal emulator focused on simplicity and performance.

These alternatives can improve your workflow and make working in the Terminal even more efficient. You can quickly install them using your specified default Linux package manager.

Start learning the Linux terminal with the basics, explore the given resources, and don’t be afraid to make mistakes. That’s how you learn.

Image credit: James Harrison via Unsplash. All alterations and screenshots by Haroon Javed.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Haroon Javed Avatar