Getting comfortable with terminal control

12 min read

LINUX BASICS

Once upon a time, nervous Nick Peers was afraid of command-line interfaces. Not any more!

There’s no escaping the Linux terminal. This is your gateway to accessing Linux’s command-line interface (CLI) or shell. While all operating T

systems have an underlying CLI, none are more visible than the terminal. If you’re new to Linux, it’s tempting to studiously avoid it, but there are very good reasons for at least acclimatising yourself to the basics of Bash, the language used to power the Linux shell.

The terminal is the app used to access the shell. The good news is that it works in exactly the same way, so whatever you learn here will be helpful should you find yourself confronted by the command-line shell instead of your desktop due to some problem or other. What might be a daunting prospect is a little less frightening when you have some previous experience to draw on. But it’s not simply about equipping yourself with some potentially vital Linux-saving skills, because another reason to love the terminal is that it’s actually quicker to do certain things via a few quick-fire commands than wading through a series of point-and-click dialogs.

With this in mind, let’s introduce you to how the terminal works, how to access it and how to get started with the fundamentals of using it.

First steps

All Linux distros ship with a default terminal app – some even come with more than one. They all work in virtually the same way, so to keep things simple, we’re using Ubuntu’s terminal here. You can open it via the Launcher, or save time by pressing Ctrl+Alt+T. When opened, you should see something like the following: user@pc-name:~$

The line is colour-coded – the first section marked in green ( user@pc-name ) confirms you’re logged in to the terminal on your own PC under your own user account (such as nick@ubuntu2404). Next to this is a blue tilde (~) symbol, which reveals the terminal’s current working directory. Because the terminal always opens to your personal Home folder, it displays the ~ shortcut. Finally, the white $ symbol is where your typed commands will appear. We use the $ to indicate terminal commands in Linux Format – type everything after the $ and press Enter to execute the command. When you log into the terminal as your own user, you don’t have administrator – or root – access to your system for security purposes. This means you only have limited access to certain commands. If you’ve come