200+ Basic Linux Commands: Definitive Cheat Sheet List with Examples

27 min


If you’re a Linux user, you’re likely familiar with the many commands that are available to you.

These commands can be used to do everything from managing files and directories, to working with text files, to monitoring system performance.

In this blog post, we’ll take a look at 200+ of the most useful Linux commands.

We’ll also discuss how to use them, and provide some examples on how they can be used in real-world scenarios. So, if you’re looking to learn more about Linux commands, read on!

200+ Basic Linux Commands listed (alphabetically) with examples:

  1. admin Command
  2. alias Command
  3. apt Command
  4. ar Command
  5. asa Command
  6. at Command
  7. awk Command
  8. basename Command
  9. bash Command
  10. batch Command
  11. bc Command
  12. bg Command
  13. break Command
  14. c99 Command
  15. cal Command
  16. cat Command
  17. cd Command
  18. cflow Command
  19. chgrp Command
  20. chmod Command
  21. chown Command
  22. chroot Command
  23. cksum Command
  24. clear Command
  25. cmp Command
  26. comm Command
  27. command Command
  28. compress Command
  29. continue Command
  30. cp Command
  31. crontab Command
  32. csplit Command
  33. ctags Command
  34. cut Command
  35. cxref Command
  36. datamash Command
  37. date Command
  38. dc Command
  39. dd Command
  40. delta Command
  41. df Command
  42. diff Command
  43. dir Command
  44. dirname Command
  45. dot Command
  46. du Command
  47. echo Command
  48. ed Command
  49. env Command
  50. eval Command
  51. ex Command
  52. exec Command
  53. exit Command
  54. expand Command
  55. export Command
  56. expr Command
  57. false Command
  58. fc Command
  59. fg Command
  60. file Command
  61. find Command
  62. flex Command
  63. fold Command
  64. fort77 Command
  65. fortune Command
  66. ftp Command
  67. fuser Command
  68. gawk Command
  69. gencat Command
  70. get Command
  71. getconf Command
  72. getopts Command
  73. grep Command
  74. groupadd Command
  75. groupdel Command
  76. groups Command
  77. hash Command
  78. head Command
  79. history Command
  80. hostname Command
  81. htop Command
  82. iconv Command
  83. id Command
  84. iostat Command
  85. ipcrm Command
  86. ipcs Command
  87. jobs Command
  88. join Command
  89. kill Command
  90. last Command
  91. less Command
  92. lex Command
  93. link Command
  94. ln Command
  95. locale Command
  96. localedef Command
  97. locate Command
  98. logger Command
  99. login Command
  100. logname Command
  101. logout Command
  102. lp Command
  103. ls Command
  104. m4 Command
  105. mailx Command
  106. make Command
  107. man Command
  108. mesg Command
  109. mkdir Command
  110. mkfifo Command
  111. mktemp Command
  112. more Command
  113. mount Command
  114. mtail Command
  115. mv Command
  116. nano Command
  117. netstat Command
  118. newgrp Command
  119. nice Command
  120. nl Command
  121. nm Command
  122. nohup Command
  123. od Command
  124. parallel Command
  125. passwd Command
  126. paste Command
  127. patch Command
  128. pathchk Command
  129. pax Command
  130. pgrep Command
  131. ping Command
  132. pkill Command
  133. pr Command
  134. print Command
  135. printf Command
  136. prs Command
  137. ps Command
  138. pstree Command
  139. pwd Command
  140. qalter Command
  141. qdel Command
  142. qhold Command
  143. qmove Command
  144. qmsg Command
  145. qrerun Command
  146. qrls Command
  147. qselect Command
  148. qsig Command
  149. qstat Command
  150. qsub Command
  151. read Command
  152. readlink Command
  153. readonly Command
  154. renice Command
  155. return Command
  156. rm Command
  157. rmdel Command
  158. rmdir Command
  159. rsync Command
  160. sact Command
  161. sar Command
  162. sccs Command
  163. sed Command
  164. seq Command
  165. set Command
  166. sh Command
  167. shift Command
  168. shopt Command
  169. sleep Command
  170. sort Command
  171. split Command
  172. ss Command
  173. stress Command
  174. strings Command
  175. strip Command
  176. stty Command
  177. suspend Command
  178. tabs Command
  179. tail Command
  180. talk Command
  181. tee Command
  182. test Command
  183. time Command
  184. times Command
  185. top Command
  186. touch Command
  187. tput Command
  188. tr Command
  189. traceroute Command
  190. trap Command
  191. true Command
  192. ts Command
  193. tsort Command
  194. tty Command
  195. type Command
  196. ulimit Command
  197. umask Command
  198. umount Command
  199. unalias Command
  200. uname Command
  201. uncompress Command
  202. unexpand Command
  203. unget Command
  204. uniq Command
  205. unlink Command
  206. unset Command
  207. unzip Command
  208. uptime Command
  209. useradd Command
  210. userdel Command
  211. uucp Command
  212. uudecode Command
  213. uuencode Command
  214. uustat Command
  215. uux Command
  216. val Command
  217. vi Command
  218. w Command
  219. wait Command
  220. wc Command
  221. what Command
  222. whereis Command
  223. which Command
  224. who Command
  225. write Command
  226. xargs Command
  227. yacc Command
  228. zcat Command
  229. zip Command

1. admin Command

admin command is a source code control system command, used to create and administer SCCS files.

Some examples admin of Command:

admin

2. alias Command

alias command instructs the shell to replace one string with another string while executing the commands.

Some examples of alias Command:

To print all aliases

alias -p

Remove aliases

unalias [alias name]

Create new aliases

alias [alias name]

3. ar Command

ar command is used to create, modify and extract the files from archives. r syntax is used to create archive files, while q is used to delete archive files.

Some examples of ar Command:

Ar command follows this

ar [OPTIONS] archive_name member_files

Lets say you have an ssl certificate yesterblog.crt that you want to put in an archive folder you want to create with ar command, named certificates. You use the command below.

ar r yesterblog.crt *certificates

4. apt Command

apt is a command-line utility for installing, updating, removing, and otherwise managing deb packages on unix

Some examples of apt Command:

To update files on your server use the command below. Choose appropraite command, depending on whether you are logged in as root or sudo.

apt update
sudo apt update

To download upgrade files from repository automatically, use the commands below, depending on whether you are root or sudo.

apt-get upgrade
sudo apt-get upgrade

To update downloaded upgrades.

apt upgrade
sudo apt upgrade

5. asa Command

The asa command asa writes its input files to standard output,

Some examples of asa Command:

To view file (created by a program using FORTRAN-style carriage-control characters) on a terminal.

asa filename

formats the FORTRAN output of b.out and directs it to the printer.

b.out | asa | lp

6. at Command

at command is a command-line utility that is used to schedule a command to be executed at a particular time in the future. at Command is similar to cron job.

Unlike cron, at command does the job once, not repeatedly like cron.

Before you can use at command, you need to install the at command on your server, be it ubuntu or centos.

To install at command on ubuntu depending on sudo or root user.

apt-get install at
sudo apt-get install at

To install at command on centos, depending on sudo or root user.

yum install at
sudo yum install at

Some examples of at Command:

To view all at pending at commands

at -l
sudo at -l

Schedule a job to run on the coming Friday.

at Friday

Schedule a job to run on the coming Friday, 50 minutes later.

at Friday +50 minutes

Schedule a job to run on a particular date and time, lets say 14th February 2022, 4:55pm

at 4:55pm 021422

Schedule system shutdown 5 hrs from now.

echo "shutdown -h now" | at now +5hrs

To delete an at command,

use the command below to list all running at commands and get the job number on the list.

at -l

Use any command below to delete at command.

at -r [job number]
atrm [job number]

7. awk Command

awk Command is used for generating reports and data manipulation. awk command can also be used for arithmetic and string operations, and conditionals and loops.

awk command can format output lines, and transform data files to produce formatted reports.

Also, it can be used to scan file line by line, perform actions on matched lines, and split each input line into fields.

Lets say you have a .txt file on your server called users.txt, and you wanted to print out the content of the .txt file, you can use awk command.

Some examples of awk Command:

awk 'print' users.txt

Output

yester ceo account 60606

blog worker account 3029

ordinary sales 540404

8. basename Command

basename Command prints the last element of a file path.

Some examples of basename Command:

basename filepath

9. bash Command

The bash command is a command line interface for the GNU operating system. It is a shell that provides both interactive and non-interactive use.

The bash command has been around since the early days of Unix, but it was not until Version 4.0 that it became widely used.

The bash command is often used to automate tasks in Linux and Unix-like operating systems, such as running a program or script at regular intervals, sending commands to another computer on a network, or updating files with another computer on the network.

Some examples of bash Command:

bash [options] [file]

10. batch Command

batch Command similar to htop command, is used to read commands from standard input or a specified file and execute them when system load levels permit

To use batch Command, type batch in command line:

batch

11. bc Command

bc Command also known as basic calculator command, is a command used to do basic arithmetic calculations. some of its options

Options:

  • h (help) – get help
  • i (interactive) : Enforce interactive mode
  • l (mathematics library or mathlib) : Define standard math library
  • w (warn) : Give warnings to POSIX bc
  • s (standard) : process exactly the POSIX bc language
  • q (quiet) Stop showing welcome print
  • v (version) : Show bc calculator version

basic calculator command supports many types of calculations:

  • Arithmetic operators
  • Increment or Decrement operators
  • Assignment operators
  • Comparison or Relational operators
  • Logical or Boolean operators
  • Math functions
  • Conditional statements
  • Iterative statements 

Some examples of bc Command:

$

12. bg Command

bg Command is used to restart suspended processes. It is a linux shell job controll command.

Some examples of bg Command:

$

13. break Command

break command is used to terminate the execution of loops:

  1. for loop
  2. while loop
  3. until loop.

Some examples of break Command:

$

14. c99 Command

c99 Command Calls the C compiler (cc) with the given options , using a C language environment compatible with the -ansiC specification.

Some examples of c99 Command:

$

15. cal Command

cal is a command-line utility used to print out calendar in the terminal.

Some examples of cal Command:

$

16. cat Command

cat command allows us to create single or multiple files, view content of a file, concatenate files and redirect output in terminal or files.

Some examples of cat Command:

$

17. cd Command

cd Command (chdir or change directory command) is a file system command used to change working directory on terminal.

Also, it can be used in shell scripts and batch files.

Some examples of cd Command:

$

18. cflow Command

cflow Command analyzes the C, C++, yacc, lex, assembler, and object files and writes a chart of their external references to standard output.

Some examples of cflow Command:

$

19. chgrp Command

The chgrp Command is a command that can be used to change the group ownership of a file or directory.

The chgrp Command is used to change the group ownership of a file or directory. It can be used to change the group ownership of files and directories in Linux, Mac OS X, and Unix-like operating systems.

The chgrp Command is also known as “chmod” in Unix-like operating systems.

Some examples of chgrp Command:

$

20. chmod Command

The chmod Command, is used to give or change file permissions on linux, using either a symbolic or numeric mode or a reference file.

Some examples of chmod Command:

$

21. chown Command

chown command, an abbreviation of change owner, is used on Unix and Unix-like operating systems to change the owner of file system files, directories.

Some examples of chown Command:

$

22. chroot Command

chroot Command, also known as change root command, is used to change the root directory

Some examples of chroot Command:

$

23. cksum Command

cksum Command (check sum Command), is a command that generates a checksum value for a file or stream of data.

Some examples of cksum Command:

$

24. clear Command

clear Command is used to clean the terminal of previous inputted and outputted data.

Some examples of clear Command:

$

25. cmp Command

cmp Command (compare Command), is used to compares two files of any type and writes the results to the standard output.

Some examples of cmp Command:

$

26. comm Command

Similar to cmp Command, the comm Command (compare Command), is a utility that is used to compare two files for common and distinct lines. comm is specified in the POSIX standard.

Some examples of comm Command:

$

27. command Command

Run a command – ignoring shell functions

Some examples of command Command:

$

28. compress Command

The compress command is a new feature in the latest version of the Linux kernel. It compresses files and folders by removing unnecessary data.

The compress command is a new feature in the latest version of the Linux kernel. It compresses files and folders by removing unnecessary data. The compression ratio can be controlled with a number of options, such as -z option which will reduce file size by 50% without losing any information, or -9 option which will reduce file size by 90%.

The compress command can also be used to create archives that are compressed with gzip or bzip2 algorithms.

Some examples of compress Command:

$

29. continue Command

The continue command is a shell programming command that allows you to continue the current line of code.

It can be used in many different ways, such as continuing a loop or continuing an if statement.

The continue command is often used in loops and if statements.

Some examples of continue Command:

$

30. cp Command

cp Command (copy Command), is a file system command that can be used to copy text from one file to another.

The cp command is a very useful tool for programmers and developers. It can be used to copy text from one file to another, or even between two different files.

The cp command is also useful for copying text from the terminal into a file.

Some examples of cp Command:

$

31. crontab Command

Crontab is a command-line utility that allows users to schedule commands to be executed periodically. It can be used for scheduling tasks such as backups, sending email, and running scripts.

The crontab command can be used in Linux and Unix-like operating systems.

Some examples of crontab Command:

$

32. csplit Command

The csplit command is a powerful text proccessing tool that can be used to split a file into multiple files. It is often used by developers and programmers who need to split large files into smaller ones for easier management.

The csplit command can also be used in other ways, such as splitting text files into multiple smaller text files or splitting logfiles into smaller logs.

Some examples of csplit Command:

$

33. ctags Command

ctags Command is a C programming command, used to create a tags file.

Some examples of ctags Command:

$

34. cut Command

cut Command is a shell programming command used to cut out selected fields of each line of a file.

Some examples of cut Command:

$

35. cxref Command

cxref Command is a C programming category command used to generate a C-language program cross-reference table.

Some examples of cxref Command:

$

36. datamash Command

datamash is a command-line program which performs basic. numeric, textual and statistical operations on input textual data files.

Some examples of datamash Command:

$

37. date Command

date Command is used to write the date and time.

Some examples of date Command:

$

38. dc Command

dc command in a linux command, used to evaluate arithmetic expressions, and evaluates expressions in the form of a postfix expression.

Some examples of date Command:

$

39. dd Command

dd Command is a filesystem command, used to convert and copy a file.

Some examples of dd Command:

$

40. delta Command

delta Command is a source code control system command, used to make a delta (change) to a source code control system (SCCS) file

Some examples of delta Command:

$

41. df Command

df (disk free) Command is used to report and display the amount of available disk space for file systems on which the invoking user has appropriate read access.

Some examples of df Command:

$

42. diff Command

diff Command is a text processing command used to compare two files.

Some examples of diff Command:

$

43. dir Command

dir (directory) Command is a command in various computer operating systems used for computer file and directory listing.

Some examples of dir Command:

$

44. dirname Command

The dirname (directory name) Command is a type of dir (directory) Command. It is used to return the directory portion of a pathname

Some examples of dirname Command:

$

45. dot Command

dot Command is a shell programming Command, used to execute commands in the current environment.

Some examples of dot Command:

$

46. du Command

du Command is a filesystem Command, used to estimate file space usage.

Some examples of du Command:

$

47. echo Command

echo Command is a shell programming command that outputs the strings that are passed to it as arguments, in standard output.

Some examples of echo Command:

$

48. ed Command

ed Command is a text processing Command, used to launch the ed standard text editor.

Some examples of ed Command:

$

49. env Command

env Command is used to list environment variables or invoke a command in a modified environment.

Some examples of env Command:

$

50. eval Command

eval Command is a shell programming Command is construct command by concatenating arguments.

Some examples of eval Command:

$

51. ex Command

ex Command is a text editor, and the line-editor mode of vi.

Some examples of ex Command:

$

52. exec Command

exec command is used for manipulating file-descriptors (FD), creating output and error logging within scripts with a minimal change.

Some examples of exec Command:

$

53. exit Command

exit Command is a shell programming Command used to cause the shell to exit.

Some examples of exit Command:

$

54. expand Command

expand command is a text processing Command used to extract a single file or a group of files from a compressed file.

Some examples of expand Command:

$

55. export Command

export Command is used to set the export attribute for variables.

Some examples of export Command:

$

56. expr Command

expr Command is a shell programming Command, used to valuate arguments as an expression.

Some examples of expr Command:

$

57. false Command

false Command is a shell programming Command, used to return false value.

Some examples of false Command:

$

58. fc Command

fc Command is used to process the command history list

Some examples of fc Command:

$

59. fg Command

fg (fore ground) Command is a process management Command, used to run jobs in the foreground.

Some examples of fg Command:

$

60. file Command

file Command is a filesystem Command used to determine file type.

Some examples of file Command:

$

61. find Command

find Command is a filesystem Command used to find files.

Some examples of find Command:

$

62. flex Command

flex Command is a C programming command, used to generate programs for lexical tasks.

Some examples of flex Command:

$

63. fold Command

fold Command is a text processing command, used to filter for folding lines.

Some examples of fold Command:

$

64. fort77 Command

fort77 Command is a C Programming, for Fortran compiling.

Some examples of fort77 Command:

$

65. fortune Command

fortune Command is used to displays a random quotation.

Some examples of fortune Command:

$

66. ftp Command

ftp (file transfer protocol) Command is used for internet file transfer between machines or programs.

Some examples of ftp Command:

$

67. fuser Command

fuser Command is a process Management Command, used to list process IDs of all processes that have one or more files open.

Some examples of fuser Command:

$

68. gawk Command

gawk Command is a text processing Command used for pattern scanning and processing language, GNU’s version of awk.

Some examples of gawk Command:

$

69. gencat Command

gencat (generate catalogue) Command is used to generate a formatted message catalog.

Some examples of gencat Command:

$

70. get Command

get Command is a source code control system command used to the get version of a source code control system file.

Some examples of get Command:

$

71. getconf Command

getconf (get configuration) Command is used to get configuration values of installations.

Some examples of getconf Command:

$

72. getopts Command

getopts Command is a shell programming Command, used to parse utility options.

Some examples of getopts Command:

$

73. grep Command

grep Command is used to search for text pattern and strings, in a group of files.

Some examples of grep Command:

$

74. groupadd Command

groupadd Command is used to create and add a new group to terminal.

Some examples of groupadd Command:

$

75. groupdel Command

groupdel Command is used to delete an existing group from terminal.

Some examples of groupdel Command:

$

76. groups Command

groups Command is used to list groups a user belongs to

Some examples of groups Command:

$

77. hash Command

hash Command is used to remember or report utility locations.

Some examples of hash Command:

$

78. head Command

head Command is a text processing Command used to copy the first part of files.

Some examples of head Command:

$

79. history Command

history Command is used to show history of all commands ever used on a terminal.

Some examples of history Command:

$

80. hostname Command

hostname is a networking command used to show the system’s host name.

Some examples of hostname Command:

$

81. htop Command

htop Command does the same thing on terminal, which task manager does on windows. htop Command shows terminal processes in real time, and the amount of system resources they are consuming.

Some examples of htop Command:

$

82. iconv Command

iconv command converts the encoding of characters read from either standard input or the specified file from one coded character set to another and then writes the results to standard output.

Some examples of iconv Command:

$

83. id Command

id (identity) Command is used to return a users identity.

Some examples of id Command:

$

84. iostat Command

iostat Command is used to collect and show operating system storage input and output statistics.

Some examples of iostat Command:

$

85. ipcrm Command

 ipcrm command removes one or more message queues, semaphore sets, or shared memory identifiers

Some examples of ipcrm Command:

$

86. ipcs Command

ipcs is a Unix and Linux command to list System V InterProcess Communication System’s API kernel entities to stdout. It also report interprocess communication facilities status.

Some examples of ipcs Command:

$

87. jobs Command

jobs Command display status of jobs in the current session

Some examples of jobs Command:

$

88. join Command

join command provides us with the ability to merge two files together using a common field in each file as the link between related lines in the files.

Some examples of join Command:

$

89. kill Command

kill Command is a built-in command which is used to terminate processes.

Some examples of kill Command:

$

90. last Command

last command is used to displays information about the last logged-in users.

Some examples of last Command:

$

91. less Command

 less Command is a Linux utility that can be used to read the contents of a text file one page(one screen) at a time.

Some examples of less Command:

$

92. lex Command

lex Command is a C programming command used to generate programs for lexical tasks.

Some examples of lex Command:

$

link Command is a filesystem utility used to call link function.

Some examples of link Command:

$

94. ln Command

ln Command is a filesystem command-line utility for creating links between files.

Some examples of ln Command:

$

95. locale Command

locale Command is a linux command used to get locale-specific information.

Some examples of locale Command:

$

96. localedef Command

localedef Command is used to define locale environment.

Some examples of localedef Command:

$

97. locate Command

locate command in Linux is used to find the files by name.

Some examples of locate Command:

$

98. logger Command

logger Command is a shell programming Command, used to log messages.

Some examples of logger Command:

$

99. login Command

login Command begins or initializes the user session environment from the user database, from the terminal.

Some examples of login Command:

$

100. logname Command

logname Command is used to return the user’s login name.

Some examples of logname Command:

$

101. logout Command


logout command allows you to logout from your current session.

Some examples of logout Command:

$

102. lp Command

lp Command is a text processing command used to send files to a printer.

Some examples of lp Command:

$

103. ls Command

ls Command is a filesystem Command used to list directory contents.

Some examples of ls Command:

$

104. m4 Command

m4 Command is used for macro processing.

Some examples of m4 Command:

$

105. mailx Command

mailx Command is a linux command used for process messages.

Some examples of mailx Command:

$

106. make Command

make Command is a shell programming utility used to maintain, update, and regenerate groups of programs.

Some examples of make Command:

$

107. man Command

man Command is used to display system documentation.

Some examples of man Command:

$

108. mesg Command

mesg Command is used to permit or deny messages.

Some examples of mesg Command:

$

109. mkdir Command

mkdir Command is a filesystem command, used make directories.

Some examples of mkdir Command:

$

110. mkfifo Command

mkfifo Command is a filesystem Command used to make FIFO special files.

Some examples of mkfifo Command:

$

111. mktemp Command

mktemp Command is a filesystem Command used to create a temporary file or directory.

Some examples of mktemp Command:

$

112. more Command

more Command displays files on a page-by-page basis

Some examples of more Command:

$

113. mount Command

mount Command is a filesystem command, used to mount a file system.

Some examples of mount Command:

$

114. mtail Command

mtail command, as the name implies, print the last N number of data of the given input.

Some examples of mtail Command:

$

115. mv Command

mv command that moves one or more files or directories from one place to another. If both filenames are on the same filesystem, this results in a simple file rename; otherwise the file content is copied to the new location and the old file is removed.

Some examples of mv Command:

$

116. nano Command

nano Command is a text Programming Command, used to display a small text editor.

Some examples of nano Command:

$

117. netstat Command

netstat Command is a networking Command, used to displays network information and statistics.

Some examples of netstat Command:

$

118. newgrp Command

newgrep Command is used to change to a new group.

Some examples of newgrp Command:

$

119. nice Command

nice Command is a process Management to invoke a utility with an altered nice value.

Some examples of nice Command:

$

120. nl Command

nl Command is a text processing Command used for line numbering filter.

Some examples of nl Command:

$

121. nm Command

nm Command is a C Programming, used write the name list of an object file.

Some examples of nm Command:

$

122. nohup Command

nohup Command is a process Management Command, used to invoke a utility immune to hangups.

Some examples of nohup Command:

$

123. od Command

od Command is used to dump files in various formats.

Some examples of od Command:

$

124. parallel Command

parallel Command is a shell utility for executing jobs in parallel.

Some examples of parallel Command:

$

125. passwd Command

passwd Command is a system Command used to set or change user password.

Some examples of passwd Command:

$

126. paste Command

paste Command is a text processing, used to merge corresponding or subsequent lines of files.

Some examples of paste Command:

$

127. patch Command

patch Command is a text processing utility to apply changes to files.

Some examples of patch Command:

$

128. pathchk Command

pathchk Command is a filesystem utility used to check pathnames.

Some examples of pathchk Command:

$

129. pax Command

pax Command is a portable archive interchange.

Some examples of pax Command:

$

130. pgrep Command

pgrep Command is a process Management used to find processes with the given name using pattern matching.

Some examples of pgrep Command:

$

131. ping Command

ping Command is a network administration software utility used to test the reachability of a host on an Internet Protocol network.

Some examples of ping Command:

$

132. pkill Command

pkill Command is a process Management utility used to kill processes with the given name using pattern matching.

Some examples of pkill Command:

$

133. pr Command

pr (print) Command is a text processing Command used to print files.

Some examples of pr Command:

$

print Command is used to print a file directly.

Some examples of print Command:

$

135. printf Command

printf Command is a shell programming utility, used to write formatted output.

Some examples of printf Command:

$

136. prs Command

prs Command is a Source Code Control System (SCCS) Command, used to print an SCCS file.

Some examples of prs Command:

$

137. ps Command

ps Command is a process Management utility, used to report process status.

Some examples of ps Command:

$

138. pstree Command

pstree Command is a process Management utility, used to display a tree of processes.

Some examples of pstree Command:

$

139. pwd Command

pwd Command is a filesystem utility used to print working directory or return working directory name.

Some examples of pwd Command:

$

140. qalter Command

qalter Command is a batch utility used to alter batch job

Some examples of qalter Command:

$

141. qdel Command

qdel Command is a batch utility used to delete batch job.

Some examples of qdel Command:

$

142. qhold Command

qhold Command is a batch utility used to hold batch jobs.

Some examples of qhold Command:

$

143. qmove Command

qmove Command is a batch utility used to move batch job.

Some examples of qmove Command:

$

144. qmsg Command

qmsg Command is a batch utility used to send message across batch jobs.

Some examples of qmsg Command:

$

145. qrerun Command

qrerun Command is a batch utility used to rerun batch jobs

Some examples of qrerun Command:

$

146. qrls Command

qrl Command is a batch utility used to release batch jobs

Some examples of qrls Command:

$

147. qselect Command

qselect Command is a batch utility used to select batch jobs

Some examples of qselect Command:

$

148. qsig Command

qsig Command is a batch utility used to signal batch jobs

Some examples of qsig Command:

$

149. qstat Command

qstat Command is a batch utility used to show status of batch jobs

Some examples of qstat Command:

$

150. qsub Command

qsub Command is a batch utility used to submit batch jobs script.

Some examples of qsub Command:

$

151. read Command

read Command is a shell Programming, used to read a line from standard input.

Some examples of read Command:

$

readlink Command is used to print resolved symbolic links or canonical file names.

Some examples of readlink Command:

$

153. readonly Command

readlink Command is used to set the readonly attribute for variables

Some examples of readonly Command:

$

154. renice Command

renice Command is a process Management utility used to set nice values of running processes.

Some examples of renice Command:

$

155. return Command

return Command is a shell Programming used to return from a function.

Some examples of return Command:

$

156. rm Command

rm Command is a filesystem utility, used to remove files or directories.

Some examples of rm Command:

$

157. rmdel Command

rmdel Command is a Source Code Control System (SCCS) utility, used to remove a delta from an SCCS file.

Some examples of rmdel Command:

$

158. rmdir Command

rmdir (remove directory) Command is a filesystem utility, used to remove a directory from linux.

Some examples of rmdir Command:

$

159. rsync Command

rsync Command is a fast and versatile command-line utility for synchronizing files and directories between two locations over a remote shell

Some examples of rsync Command:

$

160. sact Command

sact Command is a Source Code Control System (SCCS) utility, used to print current SCCS file-editing activity.

Some examples of sact Command:

$

161. sar Command

sar Command is a system administration utility, used for system activity report.

Some examples of sar Command:

$

162. sccs Command

sccs Command is a Source Code Control Utility (SCCS), used for front end for the SCCS subsystem.

Some examples of sccs Command:

$

163. sed Command

sed Command is a text processing utility, is a stream editor.

Some examples of sed Command:

$

164. seq Command

seq Command is used to print a sequence of numbers.

Some examples of seq Command:

$

165. set Command

set Command is a used to set or unset options and positional parameters.

Some examples of set Command:

$

166. sh Command

sh Command is a shell programming utility, used to shell, the standard command language interpreter.

Some examples of sh Command:

$

167. shift Command

shift Command is a shell programming utility, used to shift positional parameters.

Some examples of shift Command:

$

168. shopt Command

shopt Command is a shell programing utility, used to control optional shell behavior.

Some examples of shopt Command:

$

169. sleep Command

sleep Command is a shell programming utility, used to suspend execution for an interval.

Some examples of sleep Command:

$

170. sort Command

sort Command is a text processing utility used to sort, merge, or sequence check text files.

Some examples of sort Command:

$

171. split Command

split Command is used to split files into pieces.

Some examples of split Command:

$

172. ss Command

ss command is a linux utility used to displays information in similar fashion to netstat. Note that ss is a little crude compared to netstat.

Some examples of ss Command:

$

173. stress Command

stress Command is a shell programming testing utility, which uses a square-root function to force the CPUs to work hard.

Some examples of stress Command:

$

174. strings Command

strings Command is a C programming utility, used to find printable strings in files.

Some examples of strings Command:

$

175. strip Command

strip Command is a C programming utility, used to remove unnecessary information from executable files.

Some examples of strip Command:

$

176. stty Command

stty Command is used to set the options for a terminal.

Some examples of stty Command:

$

177. suspend Command

suspend Command is a shell programming utility, used to suspend execution of the shell until it receives a continue signal.

Some examples of suspend Command:

$

178. tabs Command

tabs Command is a linux utility, used to create tabs in terminal.

Some examples of tabs Command:

$

179. tail Command

tail Command is a text processing utility, used to copy the last part of a file.

Some examples of tail Command:

$

180. talk Command

talk Command is a linux utility, used to talk to another user.

Some examples of talk Command:

$

181. tee Command

tee Command is a shell programming utility, used to duplicate standard input.

Some examples of tee Command:

$

182. test Command

test Command is a Linux shell programming utility, used to evaluate expression, whether it is correct, before deployment.

Some examples of test Command:

$

183. time Command

time Command is a Linux process management utility, used to time the execution of a simple command.

Some examples of time Command:

$

184. times Command

times Command is a process management utility, used to write process execution times.

Some examples of times Command:

$

185. top Command

top Command is a process management utility, used to show real-time display of running processes.

Some examples of top Command:

$

186. touch Command

touch Command is a filesystem utility, used to create file and Change file access and modification times.

Some examples of touch Command:

$

187. tput Command

tput command allows shell scripts to do things like clear the screen, underline text, and center text no matter how wide the screen is.

Some examples of tput Command:

$

188. tr Command

tr (translate) Command is a text processing utility, used to translate characters.

Some examples of tr Command:

$

189. traceroute Command

traceroute command is used to determine the path between two connections.

Some examples of traceroute Command:

$

190. trap Command

trap Command is a process management utility, used to trap signals.

Some examples of trap Command:

$

191. true Command

true Command is a shell programming utility, used to return true value.

Some examples of true Command:

$

192. ts Command

ts command is to add timestamps to the beginning of each line of input.

Some examples of ts Command:

$

193. tsort Command

tsort Command is a text processing utility, used to topological sort files.

Some examples of tsort Command:

$

194. tty Command

tty Command is used to return user’s terminal name.

Some examples of tty Command:

$

195. type Command

type Command is used to displays how a name would be interpreted if used as a command.

Some examples of type Command:

$

196. ulimit Command

ulimit Command is used to set or report file size limit.

Some examples of ulimit Command:

$

197. umask Command

umask Command is used to get or set the file mode creation mask.

Some examples of umask Command:

$

198. umount Command

unmount Command is used to unmount a filesystem.

Some examples of umount Command:

$

199. unalias Command

unalias Command is used to remove aliases.

Some examples of unalias Command:

$

200. uname Command

uname Command is used to return system name.

Some examples of uname Command:

$

201. uncompress Command

uncompress Command is used to uncompress or expand compressed data.

Some examples of uncompress Command:

$

202. unexpand Command

unexpand Command is a text processing utility, used to convert spaces to tabs.

Some examples of unexpand Command:

$

203. unget Command

unget Command is a Source Code Command System (SCCS) utility, used to undo a previous get of an SCCS file.

Some examples of unget Command:

$

204. uniq Command

uniq Command is a text processing utility, used to report or filter out repeated lines in a file.

Some examples of uniq Command:

$

unlink Command is a filesystem utility used to call the unlink function.

Some examples of unlink Command:

$

206. unset Command

unset Command is used to unset values and attributes of variables and functions.

Some examples of unset Command:

$

207. unzip Command

unzip Command is a Linux processing utility, used to unzip files on a terminal.

Some examples of unzip Command:

$

208. uptime Command

uptime Command is a Linux command that returns information about how long your system has been running together with the current time, with basic users information.

Some examples of uptime Command:

$

209. useradd Command

useradd Command is used to create new user accounts.

Some examples of useradd Command:

$

210. userdel Command

userdel Command is used to delete create users.

Some examples of userdel Command:

$

211. uucp Command

uucp Command is a networking utility used for system-to-system copy.

Some examples of uucp Command:

$

212. uudecode Command

uudecode Command is a networking utility used to decode a binary files.

Some examples of uudecode Command:

$

213. uuencode Command

uuencode Command is a networking utility used to encode a binary files.

Some examples of uuencode Command:

$

214. uustat Command

uustat Command is a networking utility, used to uucp status inquiry and job control.

Some examples of uustat Command:

$

215. uux Command

uux Command is a process management utility, used for remote command execution.

Some examples of uux Command:

$

216. val Command

val Command is a Source Code Control System (SCCS) utility, used to validate SCCS files.

Some examples of val Command:

$

217. vi Command

vi Command is a text processing utility, used for screen-oriented (visual) display editor.

Some examples of vi Command:

$

218. w Command

w Command is used to show who is logged on and what they are doing.

Some examples of w Command:

$

219. wait Command

wait Command is a process management utility, used to await process completion.

Some examples of wait Command:

$

220. wc Command

wc Command is a text processing utility, used for word, line, and byte or character count

Some examples of wc Command:

$

221. what Command

what Command is a Source Code Control System (SCCS) utility, used to identify SCCS files

Some examples of what Command:

$

222. whereis Command

whereis command in Linux is used to locate the binary, source, and manual page files for a command. 

Some examples of whereis Command:

$

223. which Command

which command in linux is used to identify the location of executables.

Some examples of which Command:

$

224. who Command

who Command is a system administration utility, used to display who is on the system.

Some examples of who Command:

$

225. write Command

write Command is used to write to another user’s terminal.

Some examples of write Command:

$

226. xargs Command

xargs Command is a shell programming used to construct argument lists and invoke utility.

Some examples of xargs Command:

$

227. yacc Command

yacc Command is a C programming utility, and stands for yet another compiler compiler. yacc command converts a context-free grammar specification into a set of tables for a simple automaton that executes an LALR(1) parsing algorithm.

Some examples of yacc Command:

$

228. zcat Command

zcat Command is a text processing utility, used to expand and concatenate data.

Some examples of zcat Command:

$

229. zip Command

zip Command is used to create zip file from archives, to manage data more easily, and reduce data coruption.

Some examples of zip Command:

$

Linux Command Cheat Sheet (Categories)

Since Linux commands are so many, this cheat sheet, outlines the various types of Linux commands in their categories.

Batch Utilities Commands

Basic Batch Utilities Commands:

  1. qalter Command – Alter batch job
  2. qdel Command – Delete batch jobs
  3. qhold Command – Hold batch jobs
  4. qmove Command – Move batch jobs
  5. qmsg Command – Send message to batch jobs
  6. qrerun Command – Rerun batch jobs
  7. qrls Command – Release batch jobs
  8. qselect Command – Select batch jobs
  9. qsig Command – Signal batch jobs
  10. qstat Command – Show status of batch jobs
  11. qsub Command – Submit a script

C Programming Commands

Basic C Programming Commands:

  1. c99 Command – Compile standard C programs
  2. cflow Command – Generate a C-language flowgraph
  3. ctags Command – Create a tags file
  4. cxref Command – Generate a C-language program cross-reference table
  5. flex Command – Generate programs for lexical tasks
  6. fort77 Command – w:FORTRAN compiler
  7. lex Command – Generate programs for lexical tasks
  8. nm Command – Write the name list of an object file
  9. strings Command – Find printable strings in files
  10. strip Command – Remove unnecessary information from executable files
  11. yacc Command – Yet another compiler compiler

Filesystem Commands

Basic filesystem commands:

  1. basename Command – Return non-directory portion of a pathname
  2. cat Command – Concatenate and print files
  3. cd Command – Change the working directory
  4. chgrp Command – Change the file group ownership
  5. chmod Command – Change the file modes/attributes/permissions
  6. chown Command – Change the file ownership
  7. cksum Command – Write file checksums and sizes
  8. cmp Command – Compare two files
  9. compress Command – Compress data
  10. cp Command – Copy files
  11. dd Command – Convert and copy a file
  12. df Command – Report free disk space
  13. dirname Command – Return the directory portion of a pathname
  14. du Command – Estimate file space usage
  15. file Command – Determine file type
  16. find Command – Find files
  17. link Command – Call link function
  18. ln Command – Link files
  19. ls Command – List directory contents
  20. mkdir Command – Make directories
  21. mkfifo Command – Make FIFO special files
  22. mktemp Command – Create a temporary file or directory
  23. mount Command – Mount a file system
  24. mv Command – Move files
  25. pathchk Command – Check pathnames
  26. pwd Command – print working directory – Return working directory name
  27. rm Command – Remove files or directories
  28. rmdir Command – Remove directories
  29. touch Command – Create file and Change file access and modification times
  30. umount Command – Unmount a filesystem
  31. unlink Command – Call the unlink function

Input/Output information Command

Basic input/output information command:

  1. iostat Command – collect and show operating system storage input and output statistics

Internet Command

Basic internet command:

  1. ftp Command – Internet file transfer program

Network and Networking Commands

Basic networking commands:

  1. uucp Command – System-to-system copy
  2. uudecode Command – Decode a binary file
  3. uuencode Command – Encode a binary file
  4. uustat Command – uucp status inquiry and job control
  5. hostname Command – Show the system’s host name
  6. netstat Command – Displays network information and statistics

Process Management and Processes Commands

Basic process management commands:

  1. apt Command – For installing, updating, removing, and otherwise managing deb packages
  2. at Command – Execute commands at a later time
  3. batch Command – Schedule commands to be executed in a batch queue
  4. bg Command – Run jobs in the background
  5. fg Command – Run jobs in the foreground
  6. fuser Command – List process IDs of all processes that have one or more files open
  7. jobs Command – Display status of jobs in the current session
  8. kill Command – Terminate or signal processes
  9. nice Command – Invoke a utility with an altered nice value
  10. nohup Command – Invoke a utility immune to hangups
  11. pgrep Command – Find processes with the given name using pattern matching
  12. pkill Command – Kills processes with the given name using pattern matching
  13. ps Command – Report process status
  14. pstree Command – Display a tree of processes
  15. renice Command – Set nice values of running processes
  16. time Command – Time a simple command
  17. times Command – Write process times
  18. top Command – Real-time display of running processes
  19. trap Command – Trap signals
  20. uux Command – Remote command execution
  21. wait Command – Await process completion
  22. chroot Command – run a command or interactive shell using a specific directory as the root directory

Programming Command

Basic programming commands:

  1. make Command – Maintain, update, and regenerate groups of programs

Source Code Control System (SCCS) Command

Basic source code control system (sccs) commands:

  1. admin Command – Create and administer SCCS files
  2. delta Command – Make a delta (change) to an SCCS file
  3. get Command – Get a version of an SCCS file
  4. prs Command – Print an SCCS file
  5. rmdel Command – Remove a delta from an SCCS file
  6. sact Command – Print current SCCS file-editing activity
  7. sccs Command – Front end for the SCCS subsystem
  8. unget Command – Undo a previous get of an SCCS file
  9. val Command – Validate SCCS files
  10. what Command – Identify SCCS files

Shell programming

Basic shell programming commands:

  1. bash Command – The Bourne-again shell
  2. shopt Command – Control optional shell behavior
  3. break Command – Exit from for, while, or until loop
  4. continue Command – Continue from for, while, or until loop
  5. dot Command – Execute commands in the current environment
  6. echo Command – Write arguments to standard output
  7. eval Command – Construct command by concatenating arguments
  8. exec Command – Execute commands and open, close, or copy file descriptors
  9. exit Command – Cause the shell to exit
  10. false Command – Return false value
  11. logger Command – Log messages
  12. print Command – Print a file directly without using a Windows application that supports printing
  13. printf Command – Write formatted output
  14. sh Command – Shell, the standard command language interpreter
  15. shift Command – Shift positional parameters
  16. sleep Command – Suspend execution for an interval
  17. suspend Command – Suspend execution of the shell until it receives a continue signal
  18. tee Command – Duplicate standard input
  19. test Command – Evaluate expression
  20. true Command – Return true value
  21. command Command – Execute a simple command
  22. cut Command – Cut out selected fields of each line of a file
  23. expr Command – Evaluate arguments as an expression
  24. getopts Command – Parse utility options
  25. read Command – Read a line from standard input
  26. return Command – Return from a function
  27. xargs Command – Construct argument lists and invoke utility

System and System Administration Commands

Basic system and system administration commands:

  1. passwd Command – Set or change user password
  2. sar Command – System Activity Report
  3. who Command – Display who is on the system

Text Processing and Programming

Basic text processing and programming:

  1. awk Command – Pattern scanning and processing language
  2. diff Command – Compare two files
  3. ed Command – The standard text editor
  4. ex Command – Open text editor
  5. fold Command – Filter for folding lines
  6. gawk Command – Pattern scanning and processing language, GNU’s version of awk
  7. head Command – Copy the first part of files
  8. iconv Command – Codeset conversion
  9. less Command – Display files on a page-by-page basis
  10. more Command – Display files on a page-by-page basis
  11. paste Command – Merge corresponding or subsequent lines of files
  12. patch Command – Apply changes to files
  13. pr Command – Print files
  14. sed Command – Stream editor
  15. tail Command – Copy the last part of a file
  16. tr Command – Translate characters
  17. tsort Command – Topological sort
  18. vi Command – Screen-oriented (visual) display editor
  19. wc Command – Word, line, and byte or character count
  20. asa Command – Interpret carriage-control characters
  21. comm Command – Select or reject lines common to two files
  22. csplit Command – Split files based on context
  23. expand Command – Convert tabs to spaces
  24. join Command – Relational database operator
  25. lp Command – Send files to a printer
  26. nl Command – Line numbering filter
  27. sort Command – Sort, merge, or sequence check text files
  28. unexpand Command – Convert spaces to tabs
  29. uniq Command – Report or filter out repeated lines in a file
  30. zcat Command – Expand and concatenate data
  31. nano Command – Small text editor

Miscellenous (Misc) Commands

Miscellenous (misc) commands:

  1. alias Command – Define or display aliases
  2. ar Command – Create and maintain library archives
  3. bc Command – Arbitrary-precision arithmetic language
  4. cal Command – Print a calendar
  5. crontab Command – Schedule periodic background work
  6. date Command – Write the date and time
  7. env Command – List environment variables or invoke a command in a modified environment
  8. export Command – Set the export attribute for variables
  9. fc Command – Process the command history list
  10. fortune Command – Displays a random quotation
  11. gencat Command – Generate a formatted message catalog
  12. getconf Command – Get configuration values
  13. grep Command – Search text for a pattern
  14. groups Command – List groups a user belongs to
  15. hash Command – Remember or report utility locations
  16. id Command – Return user identity
  17. ipcrm Command – Remove a message queue, semaphore set, or shared memory segment identifier
  18. ipcs Command – Report interprocess communication facilities status
  19. locale Command – Get locale-specific information
  20. localedef Command – Define locale environment
  21. login Command – Begin sessions on a system
  22. logname Command – Return the user’s login name
  23. logout Command – End sessions on a system
  24. m4 Command – Macro processor
  25. mailx Command – Process messages
  26. man Command – Display system documentation
  27. mesg Command – Permit or deny messages
  28. newgrp Command – Change to a new group
  29. od Command – Dump files in various formats
  30. pax Command – Portable archive interchange
  31. readonly Command – Set the readonly attribute for variables
  32. seq Command – Print a sequence of numbers
  33. set Command – Set or unset options and positional parameters
  34. split Command – Split files into pieces
  35. stty Command – Set the options for a terminal
  36. tabs Command – Set terminal tabs
  37. talk Command – Talk to another user
  38. tput Command – Change terminal characteristics
  39. tty Command – Return user’s terminal name
  40. type Command – Displays how a name would be interpreted if used as a command
  41. ulimit Command – Set or report file size limit
  42. umask Command – Get or set the file mode creation mask
  43. unalias Command – Remove alias definitions
  44. uname Command – Return system name
  45. uncompress Command – Expand compressed data
  46. unset Command – Unset values and attributes of variables and functions
  47. write Command – Write to another user’s terminal

Other Commands

Other commands:

  1. datamash Command – performs basic numeric, textual and statistical operations on input textual data files
  2. mtail Command – extract metrics from application logs
  3. parallel Command – execute jobs in parallel (shell utility)
  4. rsync Command – synchronizing files and directories between two locations over a remote shell (command-line utility)
  5. stress Command – square-root function to force the CPUs to work hard
  6. readlink Command – print resolved symbolic links or canonical file names
  7. ts Command –  adds a timestamp to the beginning of each line of input
  8. uptime Command – returns information about how long your system has been running together with the current time
  9. history Command – list all commands history used on a system
  10. zip Command – compress file
  11. unzip Command – uncompress file
  12. hostname Command – display the IP address of the remote machine
  13. useradd Command – add user
  14. userdel Command – delete user
  15. clear Command – clear all inputed commands, as if you just logged into terminal
  16. dir Command – computer file and directory listing
  17. groupadd Command – create new group account
  18. groupdel Command – delete existing group account
  19. last Command – show last logged-in user
  20. locate Command – search for directory
  21. ping Command – test ip address accesibility
  22. ss Command – dump socket statistics and displays information
  23. traceroute Command – determine the path between two connections
  24. whereis Command – locate the binary, source, and manual page files for a command
  25. which Command – identify the location of executables
  26. htop Command – monitor server’s processes in real time
  27. dc Command

References

  1. Linux/Basic commands – Wikiversity

See Also:

How to create sudo user

chmod command


0 Comments