• Articles
  • Tutorials
  • Interview Questions

Top 20 Kali Linux Basic Commands

Top 20 Kali Linux Basic Commands

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

Video Thumbnail

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.

Invest in your future with the best Ethical Hacking course available. Join now and open doors to exciting cybersecurity opportunities.

EPGC in Cyber Security and Ethical 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.

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.

Get 100% Hike!

Master Most in Demand Skills Now!

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

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

Check out our blog on basic Linux commands for Devops!

rmdir

This command deletes or removes empty directories.

Syntax:

$rmdir [Option] [Directory_Name]

Example:

$ rmdir <Directory_Name>

Check out our Shell Scripting Interview Questions to ace your next interview!

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

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>

Do checkout our blog on top features of linux operating system to gain in-depth knowledge about it!

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

Course Schedule

Name Date Details
Cyber Security Course 16 Nov 2024(Sat-Sun) Weekend Batch View Details
23 Nov 2024(Sat-Sun) Weekend Batch
30 Nov 2024(Sat-Sun) Weekend Batch

About the Author

Lead Penetration Tester

Shivanshu is a distinguished cybersecurity expert and Penetration tester. He specialises in identifying vulnerabilities and securing critical systems against cyber threats. Shivanshu has a deep knowledge of tools like Metasploit, Burp Suite, and Wireshark.