Top 100 Linux Commands with Examples, Definitions, and descriptions

Top 100 Linux Commands with Examples

In this post, Top 100 Linux Commands with Examples, we have tried our best to explain each and every command with an example to make it easy to understand.

Here is a list of the top 100 linux commands with examples along with their definitions, and descriptions:

cp command in linux:
Definition: To copy files or directories.
Description: To copy files or directories from one location to another.
Example:
$ cp file_name.sql /path/destination

mv command in linux:
Definition: To move or rename files or directories.
Description: To move files or directories to a new location or rename them.
Example:
$ mv file_name.sql /path/destination

Top 100 Linux Commands with Examples

Top 100 Linux Commands with Examples

ls command in linux:
Definition: To list the directory contents.
Description: To display the files and directories in the current directory.
Example:
$ ls

cd command in linux:
Definition: To change the directory.
Description: To change the current working directory.
Example:
$ cd /path/directory

pwd command in linux:
Definition: To print the working directory.
Description: To display the current working directory.
Example:
$ pwd

mkdir command in linux:
Definition: To make directory.
Description: To create a new directory.
Example:
$ mkdir new_directory

rm command in linux:
Definition: To remove files or directories.
Description: To delete files or directories.
Example:
$ rm file_name.sql

touch command in linux:
Definition: To create an empty file.
Description: To create a new file or update and modify the time of an existing file.
Example:
$ touch new_file_name.sql

cat command in linux:
Definition: To concatenate and display files.
Description: To display the contents of one or more files.
Example:
$ cat file_name.sql

grep command in linux:
Definition: To search for patterns in files.
Description: To search for lines matching a specified pattern in one or more files.
Example:
$ grep “pattern” file_name.sql

head command in linux:
Definition: To display the beginning of a file.
Description: To display the first few lines of a file.
Example:
$ head file_name.sql

tail command in linux:
Definition: To display the end of a file.
Description: To display the last few lines of a file.
Example:
$ tail file_name.sql

chmod command in linux:
Definition: To change file permissions.
Description: To change the permissions of a file or directory.
Example:
$ chmod 755 file_name.sql

chown command in linux:
Definition: To change file ownership.
Description: To change the owner and group of a file or directory.
Example:
$ chown user:group file_name.sql

sudo command in linux:
Definition: To execute a command as the superuser.
Description: To execute a command with root (superuser) privileges.
Example:
$ sudo apt-get install package

su command in linux:
Definition: To switch user or become superuser.
Description: To Switche to another user account or becomes the superuser.
Example:
$ su username

apt-get command in linux:
Definition: To package handling utility for Debian-based systems.
Description: To install, removes, and manages software packages on Debian-based systems.
Example:
$ sudo apt-get install package

yum command in linux:
Definition: To package handling utility for RPM-based systems.
Description: To install, removes, and manages software packages on RPM-based systems.
Example:
$ sudo yum install package

tar command in linux:
Definition: To manipulate archive files.
Description: To create, views, extracts, and manipulates tar archives.
Example:
$ tar -cvf archive.tar files

df command in linux:
Definition: To display disk space usage.
Description: To Show the disk space used and available on the file system.
Example:
$ df -h

du command in linux:
Definition: To Estimate file space usage.
Description: To Estimate the file space usage of directories or files.
Example:
$ du -sh directory

free command in linux:
Definition: To display amount of free and used memory in the system.
Description: To show the free and used memory in the system.
Example:
$ free -h

top command in linux:
Definition: To display system activity in real time.
Description: To display system activity, including CPU usage, memory usage, and running processes, in real time.
Example:
$ top

ps command in linux:
Definition: To report a snapshot of the current processes.
Description: To report a snapshot of the current processes running on the system.
Example:
$ ps aux

kill command in linux:
Definition: To terminate a process.
Description: To terminate a process by sending a signal to the process.
Example:
$ kill PID

ping command in linux:
Definition: To test a network connection.
Description: To test a network connection by sending ICMP echo request packets to a target host.
Example:
$ ping example.com

ifconfig command in linux:
Definition: To configure network interfaces.
Description: To Display and configures network interface parameters.
Example:
$ ifconfig

scp command in linux:
Definition: To securely copy files between hosts.
Description: To Securely copies files between hosts over a network.
Example:
$ scp file_name.sql user@remote_host:/path/to/destination

ssh command in linux:
Definition: To secure shell client.
Description: To allow users to securely connect to a remote server over a network.
Example:
$ ssh user@remote_host

wget command in linux:
Definition: To download files from the web.
Description: To download files from the web using HTTP, HTTPS, or FTP protocols.
Example:
$ wget http://tutorialwale.com/file_name.sql

uname command in linux:
Definition: To print system information.
Description: To display system information such as kernel version, hostname, and processor architecture.
Example:
$ uname -a

date command in linux:
Definition: To display or set the system date and time.
Description: To display or set the system date and time.
Example:
$ date

history command in linux:
Definition: To display command history.
Description: To display the list of previously executed commands.
Example:
$ history

find command in linux:
Definition: To search for files in a directory hierarchy.
Description: To search for files in a directory hierarchy.
Example:
$ find /path/directory -name “*.sql”

locate command in linux:
Definition: To find files by name.
Description: To search for files by name using a pre-built index of file names.
Example:
$ locate file_name.sql

grep command in linux:
Definition: To search for patterns in files.
Description: To search for lines matching a specified pattern in one or more files.
Example:
$ grep “pattern” file_name.sql

sed command in linux:
Definition: To stream editor for filtering and transforming text.
Description: To process text files and perform text transformations.
Example:
$ sed ‘s/old_text/new_text/g’ file_name.sql

awk command in linux:
Definition: To pattern scanning and processing language.
Description: To process text files by scanning input for patterns and performing specified actions.
Example:
$ awk ‘{print $1}’ file_name.sql

tar command in linux:
Definition: To manipulate archive files.
Description: To create, view, extract, and manipulate tar archives.
Example:
$ tar -cvf archive.tar files

zip command in linux:
Definition: To package and compress files.
Description: To create zip archives to package and compress files.
Example:
$ zip archive.zip files

cut command in linux:
Definition: To cut out selected portions of each line of a file.
Description: To select specific fields or columns from each line of a file.
Example:
$ cut -d’,’ -f1,3 file.csv

sort command in linux:
Definition: To sort lines of text files.
Description: To Sort the lines of text files in ascending or descending order.
Example:
$ sort file_name.sql

uniq command in linux:
Definition: To report or omit repeated lines.
Description: To filter adjacent matching lines from input.
Example:
$ uniq file_name.sql

wc command in linux:
Definition: To print newline, word, and byte counts for each file.
Description: To count the number of lines, words, and bytes in a file.
Example:
$ wc file_name.sql

echo command in linux:
Definition: To display a line of text.
Description: To print the specified text to the standard output.
Example:
$ echo “Hello, world!”

expr command in linux:
Definition: To evaluate expressions.
Description: To evaluate mathematical expressions.
Example:
$ expr 5 + 3

tee command in linux:
Definition: To read from input and write to output files.
Description: To copy input to output and also to one or more files.
Example:
$ command | tee output.sql

watch command in linux:
Definition: To execute a program periodically, showing output fullscreen.
Description: To execute a command repeatedly and display its output fullscreen.
Example:
$ watch -n 1 command

curl command in linux:
Definition: To transfer data from or to a server.
Description: To transfer data to or from a server using various protocols.
Example:
$ curl https://tutorialwale.com

rsync command in linux:
Definition: To remote file copy and synchronization.
Description: To copy and synchronize files and directories locally or to/from a remote host.
Example:
$ rsync -avz /path/to/source user@remote_host:/path/to/destination

alias command in linux:
Definition: To create an alias for a command.
Description: To create a shortcut or alias for a command with custom arguments.
Example:
$ alias ll=’ls -l’

echo command in linux:
Definition: To display a line of text.
Description: To print the specified text to the standard output.
Example:
$ echo “Hello, world!”

exit command in linux:
Definition: To exit the current shell.
Description: To terminate the current shell session.
Example:
$ exit

logout command in linux:
Definition: To exit the current shell.
Description: To terminate the current shell session.
Example:
$ logout

clear command in linux:
Definition: To clear the terminal screen.
Description: To clear the contents of the terminal screen.
Example:
$ clear

man command in linux:
Definition: To display the manual page of a command.
Description: To display the manual page of a specified command.
Example:
$ man ls

info command in linux:
Definition: To display the info page of a command.
Description: To display the info page of a specified command.
Example:
$ info ls

whatis command in linux:
Definition: To display one-line manual page descriptions.
Description: To display brief descriptions of specified commands.
Example:
$ whatis ls

apropos command in linux:
Definition: To search the manual page names and descriptions.
Description: To search for manual pages containing a specified keyword.
Example:
$ apropos search_term

touch command in linux:
Definition: To change file timestamps.
Description: To update the access and modification times of a file or create an empty file.
Example:
$ touch file_name.sql

file command in linux:
Definition: To determine file type.
Description: To determine the file type of a specified file.
Example:
$ file file_name.sql

du command in linux:
Definition: To estimate file space usage.
Description: To estimate the file space usage of directories or files.
Example:
$ du -sh directory

df command in linux:
Definition: To display disk space usage.
Description: To show the amount of disk space used and available on the file system.
Example:
$ df -h

free command in linux:
Definition: To display free and used memory in the system.
Description: To show the free and used memory in the system.
Example:
$ free -h

ln command in linux:
Definition: To create links to files.
Description: Tpo create links to files or directories.
Example:
$ ln -s /path/to/source /path/to/link

find command in linux:
Definition: To search for files in a directory hierarchy.
Description: To search for files in a directory hierarchy based on various criteria.
Example:
$ find /path/directory -name “*.sql”

grep command in linux:
Definition: To search for patterns in files.
Description: To search for lines matching a specified pattern in one or more files.
Example:
$ grep “pattern” file_name.sql

sed command in linux:
Definition: To stream editor for filtering and transforming text.
Description: To process text files and perform text transformations.
Example:
$ sed ‘s/old_text/new_text/g’ file_name.sql

awk command in linux:
Definition: To pattern scanning and processing language.
Description: To process text files by scanning input for patterns and performing specified actions.
Example:
$ awk ‘{print $1}’ file_name.sql

tar command in linux:
Definition: To manipulate archive files.
Description: To create, view, extract, and manipulate tar archive.
Example:
$ tar -cvf archive.tar files

zip command in linux:
Definition: To package and compress files.
Description: To create zip archives to package and compress files.
Example:
$ zip archive.zip files

unzip command in linux:
Definition: To extract compressed files in a ZIP archive.
Description: To extract files from a ZIP archive.
Example:
$ unzip archive.zip

gzip command in linux:
Definition: To compress or expand files.
Description: To compress or decompress files using the gzip compression algorithm.
Example:
$ gzip file_name.sql

gunzip command in linux:
Definition: To decompress files compressed with gzip.
Description: To decompress files compressed with gzip.
Example:
$ gunzip file_name.sql.gz

bzip2 command in linux:
Definition: To compress or expand files.
Description: To compress or decompress files using the bzip2 compression algorithm.
Example:
$ bzip2 file_name.sql

unbzip2 command in linux:
Definition: To decompress files compressed with bzip2.
Description: To decompress files compressed with bzip2.
Example:
$ unbzip2 file_name.sql.bz2

passwd command in linux:
Definition: To change user password.
Description: To change the password of a user account.
Example:
$ passwd

useradd command in linux:
Definition: To create a new user account.
Description: To create a new user account on the system.
Example:
$ sudo useradd new_user

userdel command in linux:
Definition: To delete a user account.
Description: To delete a user account from the system.
Example:
$ sudo userdel username

groupadd command in linux:
Definition: To create a new group.
Description: To create a new group on the system.
Example:
$ sudo groupadd new_group

groupdel command in linux:
Definition: To delete a group.
Description: To delete a group from the system.
Example:
$ sudo groupdel groupname

chmod command in linux:
Definition: To change file permissions.
Description: To change the permissions of a file or directory.
Example:
$ chmod 755 file_name.sql

chown command in linux:
Definition: To change file ownership.
Description: To change the owner and group of a file or directory.
Example:
$ chown user:group file_name.sql

chgrp command in linux:
Definition: To change group ownership.
Description: To change the group ownership of a file or directory.
Example:
$ chgrp groupname file_name.sql

quota command in linux:
Definition: To display disk usage and limits.
Description: To display disk usage and limits for users and groups.
Example:
$ quota -u username

shutdown command in linux:
Definition: To shutdown or restart the system.
Description: To shut down or restart the system.
Example:
$ sudo shutdown -h now

reboot command in linux:
Definition: To reboot the system.
Description: To restart the system.
Example:
$ sudo reboot

ps command in linux:
Definition: To report a snapshot of the current processes.
Description: To report a snapshot of the current processes running on the system.
Example:
$ ps aux

kill command in linux:
Definition: To terminate a process.
Description: To terminate a process by sending a signal to the process.
Example:
$ kill PID

bg command in linux:
Definition: To put a process in the background.
Description: To put a suspended or stopped process in the background.
Example:
$ bg %1

fg command in linux:
Definition: To bring a process to the foreground.
Description: To bring a background process to the foreground.
Example:
$ fg %1

jobs command in linux:
Definition: To list active jobs.
Description: To list all active jobs running in the background.
Example:
$ jobs

nice command in linux:
Definition: To run a command with modified scheduling priority.
Description: To change the scheduling priority of a command.
Example:
$ nice -n 10 command

renice command in linux:
Definition: To alter priority of running processes.
Description: To change the priority of one or more running processes.
Example:
$ renice +10 PID

at command in linux:
Definition: To schedule a command to run at a later time.
Description: To schedule a command to be executed at a specified time.
Example:
$ at now + 1 hour

crontab command in linux:
Definition: To schedule a command to run periodically.
Description: To configure periodic execution of commands using cron.
Example:
$ crontab -e

tar command in linux:
Definition: To manipulate archive files.
Description: To create, view, extract, and manipulate a tar archive.
Example:
$ tar -cvf archive.tar files

zip command in linux:
Definition: To package and compress files.
Description: To create zip archives to package and compress files.
Example:
$ zip archive.zip files

cut command in linux:
Definition: To cut out selected portions of each line of a file.
Description: To select specific fields or columns from each line of a file.
Example:
$ cut -d’,’ -f1,3 file.csv

sort command in linux:
Definition: To sort lines of text files.
Description: To Sort the lines of text files in ascending or descending order.
Example:
$ sort file_name.sql

These top 100 linux commands with examples, definitions, and descriptions, cover a wide range of tasks and are essential for managing and troubleshooting Linux systems.

Read More

Best Linux Commands For Beginners

Top 10 Linux Commands with Examples

Top 20 Linux Commands with Examples

Top 30 Linux Commands with Examples

Top 40 Linux Commands with Examples

Top 50 Linux Commands with Examples

Leave a Comment