Top 20 Basic Kali Linux Commands
Updated on 25th Mar, 22 189 Views

What is Kali Linux?

Kali Linux is an open source operating system. All system hardware and resources, such as CPU, memory, and storage, are directly managed by the operating system. Kali Linux is similar to Unix, but Kali Linux can work on a large number of devices, from mobiles to supercomputers. Linux includes:

  • Kernel: It is the base component of any operating system. It manages system resources and makes users communicate with hardware by using Kali Linux commands.
  • System userspace: It contains all the codes of the applications that the user interacts with.
  • Applications: It consists of all the utilities and software that are used while working. They can be accessed by using Kali Linux commands.

Why do we need Kali Linux?

Kali Linux is primarily used by ethical hackers. It contains hundreds of cyber security tools and applications for various information security tasks such as penetration testing, forensics, and reverse engineering. The following are a few more reasons to use Kali Linux:

  • Free open-source operating system: Kali Linux is free of charge and anyone can download and use this operating system.
  • Multi-language support: The code is written in English but it includes multilingual support that allows non-English-speaking users to locate and use the tools and applications easily.
  • Wireless device support: Kali Linux is built with a wide range of wireless supports so that it can run on a wide variety of devices.
  • Completely customizable: Kali Linux can be customized according to the user, from the user interface to kernel level.

Enroll in our CEH Training if you want to learn more about Kali Linux and to master hacking!

20 Basic Kali Linux Commands

Now let us see the top Kali Linux commands that are most commonly used in the cyber security domain.

man

It displays the user manual for all commands in Kali Linux. It includes Bash command and detailed synopsis with a short description.

Syntax:

$man [option] …[command name]...

Let us take an example.

man ls: t will display the documentation of ls command

cd

This command is used to change the directory that you are working in.

Syntax:

$cd [options] directory]

Example:

$cd Desktop: This command will navigate your present working directory to Desktop.

ls

This command displays all the files and folders in a given directory.

Syntax:

ls [options]... [files]...

Example:

ls Desktop: This shows all the folders and files in the Desktop directory.

Check out the installation of Kali Linux and the basic Kali Linux commands

cat

This command reads the contents of all files that are in a terminal.

Syntax:

$cat [options].... [filename(s)]..

Example:

You have a text.txt file that has some information in it; type: $cat text.txt

touch

This commands creates new files without writing any content in it.

Syntax:

$touch [Option].. [Filename]..

Example: Let us create a file with a text name.

$ touch test1.txt

Preparing for a job interview? Head to our blog on Ethical Hacking interview questions and learn more.

mkdir

This command will create a new directory in the present working directory.

Syntax:

$mkdir [Option].. <Directory Name>..

Example: We are in the Desktop directory; let us create a test folder in it.

$mkdir test

pwd

It stands for print working directory. As the name suggests, it shows you the working directory that you are working in.

Syntax:

$pwd [Option]

Example: Now, we are in the test folder. So type: $pwd

Get 100% Hike!

Master Most in Demand Skills Now !

echo

This command displays any text as arguments. It is used for debugging shell programs.

Syntax:

$echo [Option] [String]

Example: $ echo -e “Welcome \nto \nKali”

rm

This command is used to remove or delete any directory.

Syntax:

$rm [Option] [File]

Example: We are working in a test directory.

$rm test123.txt

rmdir

This command deletes or removes empty directories.

Syntax:

$rmdir [Option] [Directory_Name]

Example:

$ rmdir <Directory_Name>

wget

This command downloads applications and web pages directly from the web.

Syntax:

$wget [Option] [URL]

Example:

$wget https://html.com/

mv

This command can do two things; it can either rename the file or directory or it can move files from one folder to another.

Syntax:

$mv [Source] [Destination]

Example:

$ mv <Initial_Filename> <New_Filename>

cp

This command copies files from one location to another.

Syntax:

$cp [Options] [Source].. [Destination]

Example: We have 2 files text1 and text2

$cp test1.txt test2.txt

Career Transition

tree

This command shows the list of contents from a director in the tree fashion.

Syntax:

$tree [Options]

Example: $tree

grep

This command searches files and prints lines that match patterns.

Syntax:

$grep [Options] [Pattern] [Filename]

Example: We have a text1.txt file. $ grep -i <pattern> <filename>

vi

This command allows the users to edit the text in the Vim editor.

Syntax:

$vi [Options] [Filename]

Example: $ vi <filename>

head

This command prints the first given number of lines from a file.

Syntax:

$head [Option] [Filename]

Example: We have a text.txt file. We print the first two lines.

$ head -n <number> <Filename>

Head to our Ethical Hacking tutorial to learn all about ethical hacking from scratch.

tail

This command prints the last given number of lines from a file.

Syntax:

$head [Option] [Filename]

Example: We have a text.txt file. We print the last two lines.

$ tail -n <number> <Filename>

wc

wc stands for word count. It shows the number of lines, words, characters, and bytes.

Syntax:

$wc [Option].. [File]..

Example: In the text file, we use wc Kali Linux command.

$ wc <Filename>
Become a Cyber Security Expert

history

This command shows the history of all the commands that you have typed and executed in the terminal.

Syntax:

$ history

Example: Let’s type: $ history

Caught up with doubts? Head to our Cyber Security Community and ask them out.

Course Schedule

Name Date
Cyber Security Course 2022-08-13 2022-08-14
(Sat-Sun) Weekend batch
View Details
Cyber Security Course 2022-08-20 2022-08-21
(Sat-Sun) Weekend batch
View Details
Cyber Security Course 2022-08-27 2022-08-28
(Sat-Sun) Weekend batch
View Details

Leave a Reply

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

Speak to our course Advisor Now !

Associated Courses

Subscribe to our newsletter

Signup for our weekly newsletter to get the latest news, updates and amazing offers delivered directly in your inbox.