Chapter - 7.1 : Command Line Essentials
Using a Text Terminal on the Graphical Desktop :
A "text terminal" is a command-line interface where users can input text commands to perform various tasks. Despite the graphical richness of the desktop, accessing a text terminal allows users to execute commands directly, providing a powerful and efficient way to interact with the underlying operating system.
A Terminal Emulator Program :
A terminal emulator program is a software application that replicates the functionalities of a physical computer terminal within a graphical user interface (GUI) environment. It allows users to interact with their computer through a text-based interface, known as a command-line interface (CLI), even when working within a graphical desktop environment. By default GNOME terminal.
The Command LIne :
Most input lines entered at the shell prompt have three basic elements :
Command -Options arguments
ls -a /home/tushar
Command is the name of the program you are executing, it may be followed by one or more options or switches that modify what the command may do, options usually starts with one or two dashes (for example : -p or --print) in order to differentiate them from argument which represents what the command operates on.
Some Useful Commands:
head : Used to show the first few lines of a file.
tail : Used to show the last few lines of a file.
man : Used to view documentation.
Logging In and Out :
Login into the system (an available text terminal will prompt for a username with the string login and password.)
You can also connect and log into remote systems by using SSH(Secure Shell) for example - by typing SSH employee at remoteserver.com. SSH, which control it would connect securely with the remote machine or remoteserver.com and give employee (that's the user) a command line terminal window either using a password or a cryptographic key to sign in without providing a password to verify the identity.
Rebooting and Shutting down :
The preferred method to shut down or reboot the system is to use the shutdown command.
NOTE: It's important to always shut down properly, failure to do so can damage the system or loss of data.
"halt" and "poweroff" commands issue :
shutdown -h ----> To halt the system.
shutdown -r -----> To reboot the system.
These above commands requires supers user or root privilages.
When administrating a multi-user system you have the option of notifying all users prior shutdown as in :
sudo shutdown -h 10:00 "shutting down for scheduled maintenance"