Introduction to Shell
Before mastering to Linux commands.
It is necessary for you to learn how to use the Linux shell, as there are many servers based on Linux,
Knowing how to use the operating system to control it effectively requires understanding and mastering Linux’s crucial part, the Shell.
When you switched from your Windows to Linux, your shell will look like this.
Ahuh! Linux terminal or shell or command line. So you can use any word which makes you comfortable.
So what does shell do?
A shell provides a text-based input/output (I/O) interface between users and the kernel for computer system.
A window in the Linux graphical user interface used to run the shell command interpreter.
Many different terminal emulators exist, such as
XTerm, and many others.
The most commonly used shell in Linux is the
Bourne-Again Shell (
BASH) and is part of the GNU project.
Everything we do through the GUI we can do with the shell. The shell gives us many more possibilities to interact with programs and processes to get information faster.
Easy to understand and includes information such as the user, hostname, and current working directory.
For a user marked with a tilde <
~> and is the default folder when we log in.
$ (Dollar Sign)
Stands for a user. As soon as we log in as
root, the character changes to a
#> and looks like this:
Let’s Master Linux Commands Now
Basic Linux Command
|ls||Used to print the content ( both files and directories ) of the specific directory in the terminal|
in alphabetical order.
|pwd||Stands for Print Working Directory and used to print the current working directory of the terminal.|
|cd||cd command stands for Change Directory and used to change the directory in the terminal.|
|touch||Used either to create a new empty file or update the timestamp of an existing file.|
|mkdir||mk stands for make and dir stand for the directory. This command allows one to create a directory in the current working directory of the terminal.|
|rm||rm stands for remove and used to delete objects such as file(s) or directories etc.|
|rmdir||rm stands for remove and dir stand for the directory and used to delete the empty directories.|
|cat||Used to view and concatenate files, it writes the data to standard output.|
|cp||cp stands for a copy and used to copy a file or group of files or directory.|
|mv||mv stands for the move and used to move multiple files or directories.|
|head||It is used to print the top N lines of the given input file.|
|tail||It prints the last N number of lines.|
Administration and System Management
|history||It is used to view the previously executed commands on shell.|
|sudo||sudo stands for Super User Do, it is used to run commands with elevated privileges.|
|kill||Used to terminate in process in Linux. It sends a signal to terminate the process.|
|whoami||Displays the user name of the current user when executed.|
|finger||Used to get detailed information about all users logged on to the system.|
|uname||This command gives information about the operating system.|
|passwd||Used to change the password of the user account.|
|shutdown||Used to shut down the system.|
|reboot||Used to restart the system.|
|useradd||Used to add a user account to the system.|
|ifconfig||ifconfig stands for Internet Configuration. This command is used to configure, control or display the information related to the network.|
|wget||It is used to download files from websites.|
|netstat||It lists out all the network connections of the system. It displays all the socket’s connections.|
|ping||This command sends the data packet composed of the message “PING” on the specified IP Address or the URL.|
|df||It is used to get information about available and used space.|
|tree||This command is used to list the directories or files of the specified directory in the form tree.|
|ps||It is used to list the process running on the system.|
|top||It is used to monitor the processor activity. It provides a real-time view of the processes running on the system.|
More Linux Commands
|clear||After executing so many commands, this command is used to to wipe out the terminal.|
|find||It is used to find files or directories while working on a large project.|
|echo||This command is used to display the pattern of characters (string) on the screen.|
|date||it is used to print date and time.|
|zip||d is used to compress the files and directories into a single file.|
|man||It is used to print detailed information about any command that we can run on the terminal.|
|exit||This command will close the terminal.|