Basic Linux Commands

Basic Linux commands

Basic Linux Commands

Basic Linux commands
Basic Linux commands

What is Linux ?

Linux is an open-source Unix operating system,Which is based on the Linux Kernel.Linux was first released in 1991, it has gained popularity for its open-source feature ,it means anyone  can freely modify and redistribute it.

The  most popular versions of  Linux are  Ubuntu ,Redhat , Fedora, Mint, Debian.Kali,Parrot More accurately, they’re called distributions or distros.

LINUX  uses a shell, an interface that gives you access to the operating system’s services. Most Linux distributions use a graphic user interface (GUI) and shell,

Linux Commands

cd command

The “cd” command is used to change the current working directory to a new working directory in Linux .The purpose of the command is the same as  we are using in Windows. 

cd command Syntax

cd [OPTIONS] directory

cd .. to move one directory up

cd to go the home folder

cd- t o move to your previous directory

pwd command

The  pwd command to find out the path of the current working directory. The command gives the output of the full path, 

Pwd syntax

pwd -L: Prints the symbolic path.

pwd -P: Prints the actual path.

ls command

The ls command is used to view the list of contents of a directory. 

Ls syntax

 ls -R will list all the files in the sub-directories as well

ls -a will show the hidden files

ls -al will list the files and directories with detailed in format

mkdir command

mkdir command to make a new directory 

Mkdir syntax

Mkdir [directory name(name of the directory you want to create)]

rm command

rm command to remove/delete directory along with its contains.

Rm syntax

Rm [options]

rm -i will ask before deleting each file. 

rm -r will recursively delete a directory and all its contents

rm -f will forcibly delete files without asking

grep command

Grep is used for search through all the text in a given file.

Grep syntax

Grep [(text you want to search)] [filename]

sudo command

The full form of sudo is “SuperUser Do”, this command is used for perform tasks that require administrative or root permissions. 

Sudo syntax


-h – help; displays syntax and command options

-V – version; displays the current version of the sudo application

-v – validate; refresh the time limit on sudo without running a command

-l – list; lists the user’s privileges, or checks a specific command

-k – kill; end the current sudo privileges

chmod command

chmod is used to change the read, write, and execute permissions of files and directories. 

Chmod syntax

Chmod [options] [mode] [filename]

ping command

the ping command to check your connectivity status of any network hosts

Ping syntax

Ping [hostname/host ip address]

man command

Man command is the most useful command in linux .It is the manual and the jurnal of the commands used in linux .you can find the details of any command along with its syntax.

Man syntax

Man [command name]


Share This Article
Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *