Commands used for System Information
Command Name & Description
|
Command(s)
|
Sample Output |
DATE The simple “date” command displays the current date and time (including the day of the week, month, time, time zone, year).
Date TZ By default, “date” command uses the time zone defined in path “/etc/localtime”. Linux user can change the time zone via Terminal by using command “TZ”.
Date --set Linux allows its user to set the current date and time of the system manually.
Date -d To operate the system on a specific date, you can change the date by using “-d”. |
|
|
DF The command “df” shows the amount of disk space used and disk space available on every file system containing each filesystem’s name and its path.
The command “df -h” shows the same result as the command “df” but now the data is in a more human-readable form that can be easily comprehended by a new user. |
|
|
FREE The command “free” displays the amount of free and used memory in the complete system.
|
|
|
PS The command “ps” which is also known as the process status command is used to provide information about the processes currently running on the system, including their respective process identification numbers (PIDs).
PS AUX & PS -EF Both list all processes of all users. In that aspect Where they differ is output format specifier,
|
|
|
UPTIME The command “uptime” provides information about how long the system has been running in one line. The result for this command includes the current time, the time duration system has been running, the number of users who are currently logged on, and the system load averages for the past 1, 5, and 15 minutes respectively. |
|
|
W The command “w” displays detailed information about the users who are logged into the system currently. |
|
|
PASSWD The command “passwd” stands for password and it is used to change the password of the user. |
|
|
EXIT The command “exit” as the name says it is used to exit from the system and log out from the current user. |
|
|
SHUTDOWN The command “shutdown” is used to shut down the system. |
|
|
Commands used for File Handling
LS The command “ls” displays the list of all directories, folder, and files present in the current directory.
LS - LTR The above-mentioned command displays the name of directories, folders, files with their respective owner name, group’s name, and rights your user has over these.
MKDIR The command “mkdir” allows users to create directories/folders in the system. The user running this command must have suitable rights over the parent directory to create a directory or they will receive an error.
RMDIR The command “rmdir” allows users to remove directories/folders from the system. The user running this command must have suitable rights over the parent directory to remove a directory AND the directory must not have any files or sub-directories within it or you will receive an error.
RM The command “rm” is used to remove files from a directory.
RM -RF Permanently deletes the specified directory and ALL files and sub-directories beneath the specified directory. Be VERY careful using this command as you can inadvertantly delete your whole drive! |
|
|
TOUCH Creates an empty file at the specified path with the specified name. Useful for creating a blank file you intend to edit with a CLI editor, such as VIM or NANO. |
|
|