In this document, you will find several useful tips in how to use the Linux terminal swiftly using several basic skills.
You will learn to:
-
Run commands
-
Travel around the terminal interface quickly and efficiently
Introduction
If you are brand new to Linux, you should start here. One of the greatest features of the GNU/Linux ecosystem is it’s ability to integrate tightly with terminal emulators. If you have ever used the command line (CLI) in Windows, it is similar in a few ways. But rather than being an administrative tool, anyone can use the Linux terminal to run many commands.
In order to open your terminal, there are a few different methods:
-
In the Tad OS graphical user interface (GUI), you can right click on your home screen, and select the 'URxvt' option.
-
In other operating systems, there is generally some menu where you will select an option named 'Terminal' or a terminal logo.
Note
|
There are many "shells" available for UNIX-like operating systems. The shell is responsible for accepting input and controlling output, making the terminal interface possible. A large majority GNU/Linux operating systems utilize the Bash (Bourne Again Shell) as the standard terminal shell. Here on out, references to the shell refer to Bash. |
Commands
Now, what can you do with your newly opened terminal? You can run commands.
Lots of them. Generally, if you hit Tab
on your keyboard twice, it will
prompt you to display all of your available options. This will show you the
thousands programs available to you.
Shortcuts
When using a terminal emulator, there are several shortcuts available which can allow you to be more efficient. This section outlines some important keyboard shortcuts which can help you become a better Linux user.
Path Shortcut
While using the terminal, you are going to types paths often. A path is a string containing all directories and finally a file name or directory. Here are a few examples
/home/tedm1/Music
/home/tedm1/Pictures/Black-Swan.jpg
Note that one of these paths leads to the directory named 'Music' and the other leads to a jpeg file name 'Black-Swan.jpg'. Both of these are examples of paths.
Never the less, both of these are paths found within the home directory of the
user tedm1
. Luckily, rather than typing this part every time, we can use a
shortcut. We can use the tilde character to refer to our home directory. Here
are the very same paths using this shortcut.
~/Music
~/Pictures/Black-Swan.jpg
Note
|
This will only work when the user tedm1 is logged in and running the prompt. If you were to run look at '~/Music' as the root user, it would refer to the directory '/root/Music' |
Keyboard Shorthand
If you are ever viewing a piece of documentation, you may see some shorthand for keyboard shortcuts. Here are a few of them described:
Here is a quick list of some keyboard shortcuts available to you while using bash:
Keys |
Description |
|
Jump to the beginning of the line (or Home key) |
|
Move back one character (or left arrow key) |
|
End a running program |
|
Delete the current character |
|
Jump to the end of the line (or End key) |
|
Move forward one character (or right arrow key) |
|
Clear the terminal of previous output |
|
Move up through command history (or up arrow key) |
|
Move down through command history, if available (or down arrow key) |
|
End the current process running in the terminal |
|
Move back one word |
|
Move forward one word |
|
Hit twice to list available commands |
Note
|
All of these keyboard shortcuts are documented in the bash manpage. You
may view it by running the command $ man bash in a terminal. But we will
discuss this later.
|