×

Linux Commands List

Linux Commands List

The Linux systems are filled with commands for several use cases. We have divided these commands into some of the most common implementations for a better understanding of these commands.

These are some of those categories.

  • File Commands
  • Process Management
  • File Permission
  • Searching
  • System Info
  • Compression
  • Network

File Commands

CommandExplanation
lsFor listing the directory content
ls –alThis lists all the content in extended information, including the hidden files.
cdChange the current directory to the home directory.
pwdThe current working directory name is printed on the terminal.
mkdirThis command helps create new directories.
Cat > fileNameThe standard input is placed into the file with the help of this command.
moreDisplay the content according to the screen size.
headDisplay the first 10 lines of the file.
tailDisplay the last 10 lines of the file.
touchThis command can update and create files.
rm fileNameRemove command helps to delete files.
rm –r dirNameRemove command can also delete directories with option –r.
cpThis can copy files and directories from one place to other.
mvThis can move the files and can also be used for renaming.
lnCreates a link between files.

Process Management

CommandExplanation
psAll the currently working processes are displayed.
topAll the running processes are displayed.
kill pidThe process is killed by using the process id.
pkill patternThis will only kill processes that match the pattern.
bgEnlist the background and stop jobs.
fgThe most recent job is brought to the foreground.

File Permission

CommandExplanation
chmodGrant various permission to the files with the help of octal. There are various permissions like read, write and execute.

Searching

CommandExplanation
grep This is to detect or search patterns in files.
locateThis is helpful in finding files by their name. Locate uses a pre-created database to find files.
findFind is a better version of locate command to search files on the system.
pgrepSearch the processes for any pattern and display the process ids.

System Info

CommandExplanation
dateDisplays the system date and time.
calDisplay the calendar
uptimeThis can print the system wake time or uptime.
wList information about the user and their activity.
whoamiDisplays the user.
uname –aDisplay system information.
manAll the commands have a user manual, and this command helps to print those manuals.
dfDisplay disk usage.
duThis command prints the space occupied by the various directories.

Compression Commands

CommandsExplanation
gzip fileThis compresses the “file” and creates a “file.gz”
gzip –d file.gzThis is to decompress the “file.gz” and create “file”
tar cf file.tar fileThis is used to create a tar file that stores the actual file.
tar xf file.tarThis is to extract the “file” from the tar file.

Network Commands

CommandsExplanation
ping hostThis command checks the connection of the system with the host and displays the results on the terminal.
whois domainThis command displays whois details for the domain specified.
wget fileHelps download files over the internet.
wget –C fileThis command resumes the stopped download.
dig domainThis provides the DNS details about the domain specified.
dig –x hostThis command is used for reverse lookup.

Related Topics

touch Command in Linux/Unix with Examples

The "touch" command in Linux (and other Unix-like operating systems) is used to create new empty files or update the timestamps of existing files. The touch command is a simple...

4 minutes read.

Linux Admin Tutorial

In publishing and graphic design, lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document without relying on meaningful content....

1 minute read.

Linux mkdir | Linux Create Directory

The Linux mkdir command is very much similar to Windows’s "new folder" feature. This command is used in Linux os to create new directories. The command mkdir stands for "make...

1 minute read.

ps Command in Linux/Unix with Examples

The 'ps' command in Linux is used to display information about the running processes on a system. The command stands for "process status" and it allows you to view details...

4 minutes read.

find Command in Linux/Unix with Examples

The find command in Linux is a command-line utility that is used to search for files and directories in a file system. It is a versatile command that can be...

5 minutes read.

cp Command in Linux/Unix with Examples

The cp (copy) command in Linux is a command-line utility that is used to copy files and directories. It is one of the most basic and commonly used commands in...

5 minutes read.

df Command in Linux/Unix with Examples

The 'df' command in Linux is used to display the amount of disk space available on the file system. The command reports the amount of disk space used and available...

3 minutes read.

Linux Tutorial for Beginners

What is Linux? Linux is an open source Operating System like Windows, Android, Mac OS, and iOS. An operating system is a software that enables communication between the user and the...

12 minutes read.

Linux ls

The primary use case of the ls command is to list the content available in the directory. The default directory is the current directory of the user. The below screenshot...

5 minutes read.

ls Command in Linux/Unix with Examples

The ls command in Linux is a command-line utility that is used to list the files and directories in a directory. It is one of the most basic and commonly...

4 minutes read.

du Command in Linux/Unix with Examples

The "du" command in Linux (and other Unix-like operating systems) is used to estimate the space used by a file or directory. The du command stands for "disk usage," and...

4 minutes read.

awk Command in Linux/Unix with Examples

The 'awk' command in Linux is a powerful text processing tool that allows you to perform various operations on text files, such as searching, replacing, and manipulating text. The command...

4 minutes read.

mkdir Command in Linux/Unix with Examples

The "mkdir" command in Linux (and other Unix-like operating systems) is used to create new directories. The "mkdir" command stands for "make directory" and it is used to create a...

3 minutes read.

sed Command in Linux/Unix with Examples

The 'sed' command in Linux is a powerful text processing tool that allows you to perform various operations on text files, such as searching, replacing, and manipulating text. The command...

3 minutes read.

Difference Between Unix and Linux

Unix vs Linux Unix and Linux both have been of great use in changing the world of operating systems. Unix was among the very few operating systems which were programmed for...

4 minutes read.

sudo Command in Linux/Unix with Examples

The sudo command in Linux is used to run a command or set of commands with the privileges of another user, typically the root user. This allows users to perform...

3 minutes read.

tar Command in Linux/Unix with Examples

The 'tar' command in Linux is used to create, maintain, and extract files from archive files called tarballs. The command stands for "tape archive" and it allows you to combine...

4 minutes read.

wc Command in Linux/Unix with Examples

The wc command in Linux is a command-line utility that is used to count the number of lines, words, and characters in a text file or standard input. The name...

4 minutes read.

man Command in Linux/Unix with Examples

The man command in Linux is used to display the manual pages for a given command or system call. These manual pages provide detailed information on the command's usage, options,...

3 minutes read.

rename Command in Linux/Unix with Examples

The rename command in Linux is used to rename multiple files at once, using a specified pattern. The command is also known as rename, ren, and mv. This command is...

3 minutes read.