1.4. Terminals¶
1.4.1. Local Terminal¶
When you run a terminal emulator on your local (personal) computer (laptop or desktop),
the default is for it to connect to the same computer it is running on. In other
words, any commands you type will execute on your local computer. For example,
executing the ls
command will list all of the files in the directory the shell
is working from on your local computer. This local terminal
provides a shell with a command-line interface to your computer. Consider the
figure below.
In the figure, we see two different terminal emulators running on two different computers: the iTerm 2 terminal emulator on the left is running on macOS and the MobaXterm terminal emulator on the right is running on Windows. While the commands that were entered by the user are similar in both images, the output is different because the commands are executing on different machines.
Most, if not all, of the basic commands that we present in the tutorial should work within a local terminal. When they do not, you should seek out and consult the documentation for your combination of terminal emulator and operating system.
1.4.2. Remote Terminal¶
In this course, you will rarely be working from your local computer. Instead,
we will instruct you to use a local terminal to launch a program that will
connect their terminal emulator to a remote computer (often referred to as a
server). Once connected, that remote terminal provides a shell with a command-line
interface to that remote computer. Once connected, any commands you type will execute
on the remote computer instead of on your local machine. So, typing ls
will list
the contents of the remote directory instead of a directory found on your computer.
Consider the figure below.
In the figure, we see two different terminal emulators running on two different machines; however, both are connected to the same remote computer. Just like you need credentials (e.g., a personal username and password) to access certain websites or online apps, you will also need credentials to initiate a remote terminal session. In the figure, the same user credentials were used in both images, which means that they are both logged in as the same user on the remote computer. Since a terminal emulator is, itself, a program, you can even have two terminal emulators on the same machine connected to the remote computer, as illustrated in the figure below.
Most Unix-like operating systems support multiple users and multiple sessions per user. Next, we will show you how to establish a remote terminal session with our departmental server. After that, you are encouraged to try logging in more than once to see what it’s like.