Basic Linux Commands

In this article, we will learn Basic Linux Commands for beginners. Linux is an open-source operating system that has gained a lot of popularity over the years. One of the most powerful tools in Linux is the command line interface. If you are a Linux user, it is essential to understand basic Linux commands to interact with the operating system efficiently. In this article, we will focus on the basic Linux commands that every user should know.

Basic Linux commands are a set of tools and utilities that allow users to interact with the operating system. You can use them to perform various tasks such as navigating the file system, creating files and directories, copying and moving files, and managing processes.

Basic Linux Commands


Here are some basic Linux commands with explanations and examples:

whoami

Displays the current user name.

date

Displays or sets the system date and time.

pwd

The pwd command stands for “Print Working Directory” and displays the current directory where the user is working.

cd

The cd command stands for “Change Directory” and allows the user to change the current directory.

ls

The ls command stands for “List” and displays the contents of the current directory.

man

The “man” command is used to display the manual page for a command.

mkdir

The mkdir command stands for “Make Directory” and is used to create a new directory.

touch

The touch command is used to create a new empty file.

cp

The cp command stands for “Copy” and is used to copy files or directories.

mv

The mv command stands for “Move” and is used to move files or directories.

rm

The rm command stands for “Remove” and is used to delete files or directories.

rmdir

The rmdir command stands for “Remove Directory” and is used to delete an empty directory.

cat

The cat command displays the contents of a file.

less

To view the contents of a file page by page the less command is used.

tail

The tail command is used to display the last few lines of a file.

head

The head command is used to display the first few lines of a file.

grep

Use the grep command to search for a specific string or pattern in a file.

find

The find command is used to search for files or directories with specific criteria.

hostname

Use the hostname command to display or set the hostname of the system.

ping

The ping command is used to check the connectivity between two hosts.

ifconfig

The ifconfig command displays the network interface configuration.

netstat

The netstat command displays active network connections and their status.

traceroute

Traces the route that network packets take to a remote server.

ssh

Connects to a remote host using the SSH protocol.

scp

The scp command copies files securely between hosts using the SSH protocol.

ps

The ps command stands for Process Status and displays information about running processes.

kill

Use the kill command to terminate a process.

du

The du command displays disk usage information.

df

The df command displays free disk space information.

uptime

The uptime command displays system uptime information.

su

Switches to a different user account.

sudo

Executes a command with administrative privileges.

tar

The tar command is used to create or extract compressed archives.

chmod

Use the chmod command to change the permissions of a file or directory.

chown

Use the chown command to change the owner of a file or directory.

These Basic Linux Commands are just a few of the many available in Linux. Each command has its own syntax and options, thus becoming familiar with these commands can help you navigate and manage files and directories, run processes, and perform basic system administration tasks on a Linux system. As you become more comfortable with the basic commands, you can start exploring more advanced commands to perform more complex tasks.

Follow us:


If you like our articles and tutorials, you can follow us on Facebook. Also, join our Official Facebook Group for QnA sessions and Discussions with the worldwide technical community.

Related posts

Leave a Comment