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

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

33
34

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.

35

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.

36

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

37
38

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
39

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
40

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

41

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”

42

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>
43

wget

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

Syntax:

$wget [Option] [URL]

Example:

$wget https://html.com/
44

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>
45

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
46
47
48

tree

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

Syntax:

$tree [Options]

Example: $tree

49

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>

50
51

vi

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

Syntax:

$vi [Options] [Filename]

Example: $ vi <filename>

52
53

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>
54

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>
55

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>
56

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

57

Course Schedule

Name Date Details
Cyber Security Course 14 Dec 2024(Sat-Sun) Weekend Batch View Details
21 Dec 2024(Sat-Sun) Weekend Batch
28 Dec 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.