Basic Linux Commands
Basic Linux Commands
The whatis command This command gives a one line description about the
command. It can be used as a quick reference for any command.
'rmdir' command removes any empty directories, but cannot delete a directory if
a file is present in it. To use ‘rmdir’ command, you must first remove all the files
present in the directory you wish to remove (and possibly directories if any).
file command - The file command determines the file type of a given file.
cat command - The 'cat' command is actually a concatenator, but can be used to
view the contents of a file.
head command - Displays the first few lines of a file. By default, the ‘head’
command displays the first 10 lines of a file. But with -n option, the number of
lines to be viewed can be specified.
tail command - Similar to ‘head’; the ‘tail’ command shows the last 10 lines by
default, and -n option is available as well.
w command - is used to check which users are logged in to the system, and what
command they are executing at that particular time.
last command - Displays information about the users who logged in and out of the
system.
netstat command - The ‘netstat’ is a command used to check the network
statistics of the system.
history command - This command shows the commands you have entered on
your terminal so far.