Kali Linux commands list – Basic to Advanced with Examples for Beginners (1 Viewer)

KAALI

ISO27001 (Counterintelligence)
Joined
Apr 7, 2020
Credits
313
Rating - 100%
1# Arch Command:
You can use the arch command to know computer architecture. Arch command prints things such as “i386, i486, i586, alpha, arm, m68k, mips, sparc, x86_64, etc.
You can use the following Syntax to check your system architecture:
#arch
2# Arp Command:
ARP stands for Address Resolution Protocol, which is used to find the address of a network neighbor for a given IPv4 address.
arp command is used to show the arp table of your Kali Linux system. You can use this command on other Linux systems as well as Windows operating systems.
arp without any option will print the current content of the ARP (MAC/CAM) table.
#arp
#3 arping Command
arping command is similar to ping command but it is working on an Ethernet layer. arping command gives the result of reachability and round-trip time on an IP address in a local network.
#arping -I eth0 -c 5 IPADDRESS
4# Aspell Command:
aspell is a spell checker command in Kali Linux, you can give file name or anything from standard input to check for misspellings.
Syntax: aspell check [options] filename
#aspell -c filename.txt
5# awk command”
awk command is used to manipulate data and generate a report in the scripting language. It allows the user to use a variable, functions both numeric and functions and logical operators.
You can write tiny and effective programs in the form of a statement by using awk utility in Kali Linux.
What can you do with awk?
  1. AWK Operations:
    (a) Scans a file line by line
    (b) Splits each input line into fields
    (c) Compares input line/fields to pattern
    (d) Performs action(s) on matched lines
    awk is Useful For:
    (a) Transform data files
    (b) Produce formatted reports
  2. Programming Constructs:
    (a) Format output lines
    (b) Arithmetic and string operations
    (c) Conditionals and loops
Syntax:
awk options ‘selection _criteria {action }’ input-file > output-file
6# bg command
bg command is used to control shell jobs. It resumes execution of a stoped or suspended process and bg command used to restart a stopped background process
Example
I used ping command followed by technicalustad.com then pressed CTRL +z to stop the service.
Next, I used jobs commands to see available jobs.
Again I used bg command to restart the stoped command “ping technicalustad.com”
7# basename command
You can use basename command to remove base directory information and suffixes from the file names. You can print any file name with any leading directory components removed
Syntax:
#basename NAME [SUFFIX]
or
#basename OPTION NAME
8# Bzip2
Bzip2 is a basic utility for compress and decompress files. It is pre-installed in kali Linux as other commands.
Syntax:
#bzip2 [Options] [filename]
An example:
I used cat command to create a new file name with the filename.txt
Later I used bzip2 command followed by -z (option for compress file) and file name.
Next option -d, I used for decompressing “filename.txt.bz2”
When you use bzip2 command to compress file, The new file will be created with .bz2 extension. You will decompress any file with .bz2 extension by using bzip2 command.
9# cal command:
Cal command is used to display calendar
$cal

10# cat command:
This tutorial for hackers, So if you will get access to any computer of the drive then you will 100% find some files. so cat command is used to see, edit matter inside the file. You can create a file and add content inside the file.
How is it possible?
Simple use
$cat > ‘New File’ [Create a new file or overwrite data on the desired file]
$cat “file name” [See matter inside file]
$ cat >> “filename” [add some data into file]
11# cksum command
cksum command stands for checksum is used to calculates a CRC (cyclic redundancy check) and byte count for each input file, and writes it to standard output.
In a simple way, this command is used to check file’s data for being corrupted when transferred one location to another.
Command syntax is simple and straight forward
#cksum filename
12# Clear command
Clear command is used to clear the terminal screen when you are running multiple commands in terminal the terminal screen getting full.
So use the clear command and enjoy a clean screen again.3
#clear
13# cmp Command:
the cmp command is used to compare two files byte by byte. If a difference is found, it reports the byte and line number where the first difference is found.
If no differences are found, by default, cmp returns no output.
Basic syntax of cmp command
#cmp file1.txt file2.txt
14# comm Command
you can use comm command to compare two sorted files line by line. The basic syntax to use this command:
#comm file1.txt file2.txt
15# cp command:
Cp command is used to copy one or more files from one location to another location.
#cp /source/location/path /destination/location/path
If you are copying file from the current working directory then give a file name and source address.
#cp filename /destination/location/path
Use the cp command carefully because it will overwrite files without asking. It means if the destination file name already exists, its data will be erased. you can use -i option to prompt for confirmation.
This is big command and can be used in different ways. here you can read more about https://www.computerhope.com/unix/ucp.htm
16# Crontab Command:
In kali Linux operating systems, The crontab command is used to view or edit the table of commands to be run by cron. The cron table is the list of tasks scheduled to run at regular time intervals on the Linux system.
The daemon which reads the crontab and executes the commands at the right time is called cron.
Crontab command examples
#crontab -e
Edit your crontab.
#crontab -l
Display (“list”) the jobs of your crontab.
#crontab -r
Remove your crontab.
#crontab -u technicalustad -e
Edit crontab for user technicalustad.
16# cut Command:
cut command is used to cut parts of lines from specified files or piped data and print the result to standard output. It can be used to cut parts of a line by delimiter, byte position, and character
The basic syntax for the cut command is as follows:
cut OPTION… [FILE]…
You can use cut command followed and specified with filed
for the example:
#cut -f 1,3 file.txt
16# Date Command:
date command is used for checking the current date and time.
the date can be changed by running the following code
$ date –set=’20 September 2019 13:09′
but the normal user can’t change system time, Then you are thinking about “how to change system time” Of-course I will teach you in this article, dont worry about it.
Some examples of date command:
$ date -d now
$ date -d today
$ date -d yesterday
$ date -d tomorrow
$ date -d sunday
$ date -d last-sunday
17# dc command:
The desk calculator works with postfix notation; rather like many HP Calculators. Basic arithmetic uses the standard + – / * symbols but entered after the digits.
Syntax
dc [-V] [–version] [-h] [–help] [-e scriptexpression]
[–expression=scriptexpression] [-f scriptfile] [–file=scriptfile]
18# Dd command
dd stands for data duplicator, which is mainly used to copy and convert data. but this tool can be used for:
  • Backing up and restoring an entire hard drive or a partition.
  • Creating virtual filesystem and backup images of CD or DVDs called ISO files
  • Copy regions of raw device files like backing up MBR (master boot record).
  • Converting data formats like ASCII to EBCDIC.
  • Converting lowercase to uppercase and vice versa.
dd command is not basic command so you must be superuser to execute it.
Syntax of dd command is
dd if= of= [Options]
19# df command
The df command stands for Disk Free is used to reports file system disk space usage. It displays the amount of disk space available on the file system of Kali Linux. The df command reports how much free disk space we have in our system.
simple syntax:
#df
20# diff command
Diff command is used to display the differences between two files.
Basic Syntax:
#diff file1.txt file2.txt
21# diff3 command
Diff3 command is used to show differences among the three files.
Basic Syntax
#diff3 file1.txt file2.txt file3.txt
22# dig command
dig command is a powerful command in kali Linux used to for DNS lookup. Simple use and simple syntax
#dig www.domainname.com
You will get all the information related DNS of the website.
23# dir Command
dir command is used to print the content list of a directory. Most of Linux user use ls command instead of dir command. but you can use it.
Basic Syntax:
#dir [OPTION] [FILE]
Example:
#dir /etc
24# echo command:
Display message on the screen
The echo command is one of the most basic commands in Linux used to display a message on the screen. The arguments passed to echo are printed to the standard output.
echo is commonly used in shell scripts to display a message or output the results of other commands.
Example:
#echo Hello world!
25# Egrep Command
The egrep command is used to search files for lines that match a text pattern. It performs the match by using extended regular expressions. Running egrep is equivalent to running grep with the -E option.
Basic Example:
#egrep “support|help|windows” myfile.txt
Search for patterns of support help and windows in the file myfile.txt.
26# Eject Command
Eject command is used to remove a removable media (typically a CD-ROM, floppy disk, tape, or JAZ or ZIP disk) under software control. You can eject DVD by pressing a button, but you can remove it without touching button just type the following command:
#eject
Use the following command, in the case above command, is not working:
#eject /dev/cdrom
#eject /dev/cdrw
#eject /dev/dvd
#eject /dev/dvdrom
#eject /dev/dvdrw
27# ethtool Command
ethtool is a networking utility used to configure ethernet devices on Kali Linux.
#ethtool [ethernet card]
If you want to display network usage statistics with ethtool by using the following command
#eththoo -S eth0
where eth0 is a card name
28# whoami command:
it is looking something difference command but it is used to tell about you. For example if you forget “which user is logged in?. This command will tell you who are you current.
$whoami
28# pwd command:
pwd command is used for print working directory. It means “On what location you are“. here location meaning is directory and sub-directory.
The parent directory is “/” called root directory.
Don’t be confused with /root directory, this root directory “/root” is home directory for root user.
30# ls command:
ls command is used to see files and directory inside a directory. using ‘ls’ without any location will list the files and folders inside the current directory.
If you want to look up inside another directory, you will have to specify location.
$ls
$ls /var
$ls /home/username
31# cd command:
the cd command is a very useful command and plays a very important role for Linux user. This command is used for changing directory. And the basic syntax will be as below:
cd /desired/location
If you use blank ‘cd’ without location then you will move in the user’s home directory. so see the power of cd commands and enjoy!
$cd
$cd ..
$cd /desired/location ($cd /home/vijay)
32# mkdir command:
Do you know about the directory? It is a term used for the folder. You can say windows folder is a directory in Linux It is very easy to create a folder in Windows” but not in Linux. T
The graphical interface is really awesome, but the command interface is not less. The command-line interface is the fastest way to operate a Linux based Operating System. Linux users love it.
mkdir command is used to create a directory. if want to create a directory within the current directory, just use mkdir ‘directory name’.
if you want to create a directory in the desired location then
$mkdir /desired/location/directory name.
$mkdir lab
31# cd command:
the cd command is a very useful command and plays a very important role for Linux user. This command is used for changing directory. And the basic syntax will be as below:
cd /desired/location
If you use blank ‘cd’ without location then you will move in the user’s home directory. so see the power of cd commands and enjoy!
$cd
$cd ..
$cd /desired/location ($cd /home/vijay)
32# mkdir command:
Do you know about the directory? It is a term used for the folder. You can say windows folder is a directory in Linux It is very easy to create a folder in Windows” but not in Linux. T
The graphical interface is really awesome, but the command interface is not less. The command-line interface is the fastest way to operate a Linux based Operating System. Linux users love it.
mkdir command is used to create a directory. if want to create a directory within the current directory, just use mkdir ‘directory name’.
if you want to create a directory in the desired location then
$mkdir /desired/location/directory name.
$mkdir lab
31# cd command:
the cd command is a very useful command and plays a very important role for Linux user. This command is used for changing directory. And the basic syntax will be as below:
cd /desired/location
If you use blank ‘cd’ without location then you will move in the user’s home directory. so see the power of cd commands and enjoy!
$cd
$cd ..
$cd /desired/location ($cd /home/vijay)
32# mkdir command:
Do you know about the directory? It is a term used for the folder. You can say windows folder is a directory in Linux It is very easy to create a folder in Windows” but not in Linux. T
The graphical interface is really awesome, but the command interface is not less. The command-line interface is the fastest way to operate a Linux based Operating System. Linux users love it.
mkdir command is used to create a directory. if want to create a directory within the current directory, just use mkdir ‘directory name’.
if you want to create a directory in the desired location then
$mkdir /desired/location/directory name.
$mkdir lab
$mkdir /home/vijay/lab1
 

Users who are viewing this thread

Top