List of content you will read in this article:
- 1. What exactly is a computer Terminal?
- 2. Most Common Terminal Commands That You Should Be Aware Of
- 3. Other Related Terminologies
- 4. Conclusion
What exactly is a computer Terminal?
Those who use Linux OS must've noticed that when they click on the "Terminal" icon, a window appears, and this rectangular frame or window is referred to as a terminal. With the creation of modern computers, we now have an application called "Terminal," which we can access with a single click. However, in the 1980s, it was known as "Terminal Emulators," which was not a software program but hardware comprising a keyboard and a monitor.
What does terminal mean? However, unlike a computer, the goal of a terminal is to send commands to some other system, not to process information. The terminal is a program that gives a simple command-line interface to the user and fulfils two tasks:
- The user's input is in the form of commands.
- Displays the output on the screen.
The terminal is widely referred to as a dumb thing because it doesn't know what to do with the input and requires another application to process it, which is usually the shell.
Most Common Terminal Commands That You Should Be Aware Of
As a developer, you might want to create one or more files without altering them occasionally. And for this, use the following touch command:
$ touch index.html
$ touch one.txt two.txt three.txt
The touch command is for updating a file's access / changed date; the fact that it creates a file if it doesn't exist is merely a nice bonus.
Cat and Less
The command cat stands for "concatenate," and it does more than just output file contents. It's as simple as giving a file to the command:
$ cat shoppingList.txt
However, if the file is huge, the contents will scroll past you, leaving you at the bottom. However, with the use of the 'less' command, users can inspect large files on the command line.
$ less shoppingList.txt
The curl command is majorly used for downloading files:
$ curl -O http://www.domain.com/path/to/download.tar.gz
The -O parameter instructs curl to save the downloaded data to the same file as the remote file. If you don't specify this parameter, curl will presumably merely display the file in the command line (assuming it's text).
Sudo isn't truly a command, but it'll come in handy as you get more comfortable with the command line. The superuser, or root user, is the sole user who has complete control over the system. However, being signed in as the superuser isn't safe because of all that power.
Instead, you can give yourself root permissions for a single task by using the sudo (superuser do) command. You'll be prompted for your user account password, which you must supply before the system may run the command. For example,
$ gem install heroku
A majority of commands in a bash shell are highly flexible and have many hidden abilities. If you're not sure if the command will do what you want, or if you're going to see some general instructions on how to use a command, you have to look at the manuals, often known as man pages. Type man, followed by the command you're interested in.
$ man ln
This command will help you turn your computer off from the command line. A shutdown command requires sudo permissions to run. You'll need to specify a flag or two for the command; the most frequent ones are -h to halt (shut down), -r to reboot, and -s to put it to sleep.
$ sudo shutdown -s
Other Related Terminologies
The "Console" in Windows OS serves the same functions as the terminal. Therefore, we can say that the console is the alias name for the Terminal in Windows OS. However, instead of opening the console immediately, we must first launch the Command Prompt, which then opens the console or the rectangular frame on the screen.
The shell serves as a mediator or interface between the end-user and the kernel. The end-command users' area is interpreted by it. Furthermore, it examines the command's syntax before determining if it was appropriately executed.
If everything is in order, the shell transforms the command into a form that the kernel can understand and sends it to the kernel. Otherwise, an error message is displayed.
Just after Shell, it's a computer program that manages up the OS's innermost component. The kernel is responsible for executing commands with the support of its two components, OS libraries and Device Drivers, which interface with application software and device hardware, respectively, after the shell translates the user's input into the kernel-understandable form.
We covered the basics of what is a terminal and how to use it. Some operations can be completed significantly faster using a Terminal than with graphical interfaces and menus. Another advantage is that it gives you access to a lot more commands and scripts.
When opposed to browsing through the Software Centre or Synaptic Manager, a common terminal task of installing an application can be accomplished with just one command.
People also read: