All Linux Commands With Example PDF
All Linux Commands With Example PDF
Similar to the Command Prompt in Windows, Linux has the Terminal in order to help you
configure and interact with your system. For someone to work in the Terminal they need
to familiarize themselves with Linux commands. Once familiarized it is fairly easy to work
from the Terminal and that is why most of the Linux workers prefer the Linux terminal over
the GUI.
This article will help you to get familiarized with all the most common Linux commands
and their usages. These commands are divided into 15 sections based on their
functionalities.
Table of Contents
https://linoxide.com/linux-how-to/linux-commands-brief-outline-examples/ 1/13
05/10/2019 All Linux Commands with Example
1. uname (https://linoxide.com/linux-command/uname-command/)
: Displays linux system information. With -a switch you can view all the
information, with -r switch you can view kernel release information and w
ith -o you can view OS information
2. cat /etc/redhat_release : Shows which version of redhat installed
3. uptime (https://linoxide.com/linux-command/linux-uptime-command/)
: Shows how long the system has been running
4. hostname (https://linoxide.com/linux-command/display-set-hostname-linu
x/) : Shows system host name. With -i switch you can view
the ip address of the machine and with -d you can view the domain name
5. last (https://linoxide.com/linux-command/linux-last-command/) reboot
: Shows system reboot history
6. date (https://linoxide.com/linux-command/date-command-linux/)
: Shows the current date and time. You can specify the format you want to
view the date as well. As an example, by using 'date +%D' you can view the
date in 'MM/DD/YY' format
7. cal (https://linoxide.com/linux-command/cal-ncal-commands-display-calen
der-linux/) : Shows the calendar of the current mont
h. With -y switch you can view the calendar of the whole current year
8. w : Displays who is logged (https://linoxide.co
m/linux-command/linux-w-command/) on and what they are doing
9. whoami (https://linoxide.com/linux-command/linux-whoami-command/)
: Shows current user id
10. finger (https://linoxide.com/linux-command/finger-command-user-detail
s/) user : Displays information about user
11. reboot : Reboots the system
12. shutdown (https://linoxide.com/linux-command/examples-linux-shutdown-c
ommands/) : Shuts down the system
https://linoxide.com/linux-how-to/linux-commands-brief-outline-examples/ 2/13
05/10/2019 All Linux Commands with Example
https://linoxide.com/linux-how-to/linux-commands-brief-outline-examples/ 3/13
05/10/2019 All Linux Commands with Example
User-Related Commands
These commands are used to manage Linux users
https://linoxide.com/linux-how-to/linux-commands-brief-outline-examples/ 4/13
05/10/2019 All Linux Commands with Example
https://linoxide.com/linux-how-to/linux-commands-brief-outline-examples/ 5/13
05/10/2019 All Linux Commands with Example
https://linoxide.com/linux-how-to/linux-commands-brief-outline-examples/ 6/13
05/10/2019 All Linux Commands with Example
-file to target-file
58. sort : Sorts files in alphabetical o
rder
59. uniq : Compares adjacent lines in a
file and removes/reports any duplicate lines
60. wc : Counts number of words/lines
61. dir : Lists the content of the dire
ctory
62. tee : Command for chaining and redi
rection (https://linoxide.com/linux-how-to/linux-tee-command-examples/)
63. tr : Command for translating chara
cters (https://linoxide.com/how-tos/linux-tr-command/)
https://linoxide.com/linux-how-to/linux-commands-brief-outline-examples/ 7/13
05/10/2019 All Linux Commands with Example
https://linoxide.com/linux-how-to/linux-commands-brief-outline-examples/ 8/13
05/10/2019 All Linux Commands with Example
https://linoxide.com/linux-how-to/linux-commands-brief-outline-examples/ 9/13
05/10/2019 All Linux Commands with Example
File Transfer Related Commands
These commands are used to copy files from one system to another system
https://linoxide.com/linux-how-to/linux-commands-brief-outline-examples/ 10/13
05/10/2019 All Linux Commands with Example
Directory Traverse Related Commands
These commands are used to change the directory
https://linoxide.com/linux-how-to/linux-commands-brief-outline-examples/ 11/13
05/10/2019 All Linux Commands with Example
Conclusion
In this tutorail, we have learned almost all linux commands. Thanks for reading and
please put your suggestions on this. Apart from the commands mentioned in this guide,
there are various options/switches could be used along. But this article only focuses on
the most common commands that are useful for day-to-day activities and if you need
more information on them, you can always use the 'man' command on Linux.
Read Also :
Linux Commands Cheat Sheet in Black & White (https://linoxide.com/linux-command/linux-
commands-cheat-sheet/)
38 Basic Linux Commands to Learn with Examples (https://linoxide.com/linux-
command/essential-linux-basic-commands/)
Comments
Your email address will not be published. Required fields are marked *
Name * Email *
https://linoxide.com/linux-how-to/linux-commands-brief-outline-examples/ 12/13
05/10/2019 All Linux Commands with Example
https://linoxide.com/linux-how-to/linux-commands-brief-outline-examples/ 13/13