×

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

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.

Linux pwd

The pwd command is used to print or display the name of the working or current directory. Some shells have their own version of the pwd with several features, in...

1 minute read.

wget Command in Linux/Unix with Examples

The wget command is a command-line utility in Linux that is used to download files from the internet. It supports various protocols including HTTP, HTTPS, and FTP and can be...

5 minutes read.

Linux cd

Linux cd: As in GUI operating systems like Windows 10, we use the mouse to travel to various folders back and forth; similarly, we have the “cd” command in Linux...

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

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.

telnet Command in Linux/Unix with Examples

The telnet command in Linux is a command-line utility that allows you to connect to a remote host using the Telnet protocol. Telnet is a network protocol that provides a...

3 minutes read.

rm Command in Linux/Unix with Examples

The "rm" command in Linux (and other Unix-like operating systems) is used to remove files and directories. The "rm" command stands for "remove" and it is used to delete files...

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.

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.

cut Command in Linux/Unix with Examples

The "cut" command in Linux (and other Unix-like operating systems) is used to remove sections from each line of a file or stream of data. The cut command is often...

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

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.

scp Command in Linux/Unix with Examples

The scp (secure copy) command in Linux is a command-line utility that is used to securely transfer files between two hosts over a network. It is similar to the cp...

4 minutes read.

addr2line Command in Linux with Examples

Use of addr2line Command The addr2line command is used to convert addresses to line numbers and file names. This command uses debugging info to check which line number and file name...

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

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.

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.

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.

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.