1. alias command example
alias command helps you to define your own command or command shortcuts so that you can customize the command and it will work the way you want (Click on picture to enlarge it).
Syntax:
alias name=”value”
# alias tf=’tail -f /var/log/messages’
# tf
2. id command example
id stands for identity, command to find out the user and group name and numeric ID of users on system. In short id command shows user’s information like UID, user belongs to which groups id (UID) etc.
more command shows the content of a text file on terminal one screen at a time in case of large file and it is available on Unix and Unix-like operating system. Following keys are used in more command.
. Enter key: To scroll down page line by line
. Space bar: To go to next page
. b key: To go to the backward page
. / key: Search a string
more [options] file…
ssh stands for Secure Shell command is used login in the remote system, transfer files between two systems and executing commands on remote systems. As name suggest, it is secure connection between two hosts over an network and runs on TCP port 22.
Syntax:
kill built-in command to terminate process manually. To kill a process we need to provide the PID of the process. ps is the command to display a list of running processes with their PID number.
Syntax:
kill pid …
To list all available signals, use the -l
$ kill -l
6. last command example
last command searches through the file /var/log/wtmp and displays list of all users logged in and out
Syntax:
last [options] [username…] [tty…]
7. scp command example
scp (secure copy) command is to copy file(s) and directory(s) across the systems securely. During scp command it needs passwords or keys for authentication.
Syntax:
scp [options] [file_or_directory] [user]@[target_host:/directory]
(Click on picture to enlarge it)
rsync (Remote Sync) command to copy or synchronize files and directories locally or remote host. This is useful for data backup and mirror across Linux hosts.
Syntax:
rsync [OPTION…] SRC… [DEST]
9. ssh command example
ssh is a common way to connect remote Linux system. ssh (secure shell) command as well as protocol to securely connect to a remote hosts. ssh runs on TCP Port 22.
Syntax:
ssh user@remote_host

10. useradd command example
useradd or adduser command to create a new user. useradd commad will update system files and also create new user’s home directory and copy initial files. root access is required for useradd command.
Syntax:
useradd [options] [username]
11. passwd command example
passwd command to change user’s password. root access is required for passwd command.
Syntax:
passwd [username]
12. usermod command example
usermod command to modify any attributes of existing user through command line such as changing user’s home directory, login name, password expiry date and more.
Syntax:
usermod [options] username
(Click on picture to enlarge it)
13. userdel command example
userdel command to delete existing user account and it’s associated files and directories. The userdel command must be run as root credential.
Syntax:
userdel [options] username
# userdel -r ved
-r option will remove user’s home directory and mail spool.
14. ifconfig command example
ifconfig (Interface Configuration) command line utility is use for network configuration of Linux and Unix-like operating system also shows active interfaces and it’s IP address, netmask and other details.
Syntax:
ifconfig […OPTIONS] [INTERFACE]
$ ifconfig
-a : Shows all interfaces which are currently available even if is down.
15. IP command example
how to find IP Address of Linux System using command line? ip stands for Internet Protocol. ip command is also one of the frequently use command in Linux. This command is use to perform several network administration tasks like assigning / deleting IP address, adding static and default route, set up tunnel over IP and more. ip addr show command to find a list of all network interfaces details and it’s IP address associated with it.
Syntax:
ip [ OPTIONS ] OBJECT { COMMAND | help }
$ ip addr show
16. man command
man (manual page) is an online manual of different commands which provide detailed descriptions and usage of the command and are available in Unix or Unix-Like Operating Systems.
Syntax:
man [commands]
$ man ls
17. exit command
exit command in Linux to exit from currently running shell or terminal.
Syntax:
exit
$ exit
18. sleep command example
sleep command is used to delay command or script execution for certain period of time. This will pause any command execution for particular purpose. We can set delay amount by Second, Minutes, Hours and Days.
Syntax:
sleep NUMBER[SUFFIX]
$ sleep 10
$ ls -l && sleep 1 && df -h
19. systemctl command examples
systemctl control the systemd system and service manager. systemctl command is the central management tool for controlling the init system. This will manage services, check status, change system states and work with configuration files. systemd is now the default init system for Linux distributions.
Syntax:
systemctl [OPTIONS…] COMMAND [NAME…]
To start service
# systemctl start cups.service.
To Stop Service
# systemctl stop cups.service.
To restart or reload service
# systemctl restart cups.service.
To enable Service
# systemctl enable cups.service.
To disable Service
# systemctl disable cups.service.
To check the Service status
# systemctl status cups.service.
20. uname command example
uname command used to determine the processor architecture, hostname and kernel version running on the system. It is easy and quick to get the system information using uname utility.
Syntax:
uname [OPTION]
# uname -a
21. ps command example
ps command to display a list of running processes with their PID number.
# ps -aux
In this post, we have covered 21 Linux command that Every Linux System Administrator Should Know With Examples. We will be covering another series of commands in the next articles. Stay tuned !!! Also share it with others also follow us on Facebook Official Page.