×

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

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.

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.

echo Command in Linux/Unix with Examples

The "echo" command in Linux is used to display a line of text on the terminal. It can also be used to print the value of a variable or to...

3 minutes 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.

ping Command in Linux/Unix with Examples

The "ping" command in Linux (and other Unix-like operating systems) is used to test the connectivity between two networked devices. The "ping" command sends a small packet of data, called...

4 minutes read.

chmod Command in Linux/Unix with Examples

The chmod command in Linux is a command-line utility that is used to change the permissions of files and directories. It stands for "change mode" and it is used to...

4 minutes 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.

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.

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.

How to change the ApacheHTTP port in Linux

What is an Apache HTTP server in Linux? When we talk about the most commonly used web servers, one of the web servers that cannot be missed is Apache. With the...

4 minutes read.

Linux apt-get command

Apt-get is a command-line that helps to handle the packages in Linux. Its major task is to assist in retrieving data and packages from trusted sources for purposes of installation,...

6 minutes read.

addgroup Command in Linux with Examples

What is the addgroup command? It is a command in Linux to create a new group using specified command lined and the system’s default values. How to add groups Adding a user group:...

4 minutes read.

gzip Command in Linux/Unix with Examples

The gzip command in Linux is used for compressing and decompressing files. It uses the Lempel-Ziv coding (LZ77) algorithm to compress files, which is known for its high compression ratio...

6 minutes read.

Linux SCP Command

SCP stands for secure copy protocol. It is a command-line application for copying files and directories safely between two places. Command-line utilities are programs that operate on a computer's command...

3 minutes read.

Top 20 Linux Commands

1) clear command clear is a standard operating system command which is used to clear the terminal screen. This command brings the command line on the top of the terminal. By pressing the...

10 minutes read.

chown Command in Linux/Unix with Examples

The 'chown' command in Linux is used to change the ownership of a file or directory. The command stands for "change owner" and it allows you to change the user...

3 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.

Linux Bash

Linux Bash In this tutorial, we are going to learn what the shell is? And how many various shells we have, we have also covered most of the bash shell features....

4 minutes read.

Linux Distributions

Linux Distributions Linux OS is not like other operating systems. Linux can be modified according to the user’s requirements, and it is very flexible to any change. Linux distributions are often...

4 minutes read.

Linux rmdir command

The default use case of the rmdir command in the Linux system is to delete an empty directory. The below screenshot shows how to delete the empty directory. First, we...

1 minute read.