Basic Commands of Kali Linux and Their Use | Important Commands of Kali Linux | Kali Linux Basics

In this article we will discuss the basic core commands of the Kali Linux which are very necessary for a normal user as well as for a hacker to use the Kali Linux and these are the commands that we must learn on finger tips to use the Kali Linux.

Some Guidelines to Use Commands:

Always open the terminal in directory/folder where you want to work for example you want to make a folder on Desktop. Then you should do as, right click, go to option (open terminal here) and then you should use the command.

But it is necessary when you do a specific work in the directory like make a folder, file etc.

But (open terminal here) option is not used always.

Always press (enter) button after writing command to run it in terminal.

Before reading this Article keep in mind that;

Heading before Colon written In Capital Letters shows the Use/Purpose of command.

Brackets are not part of commands so write without brackets.

Content after + shows your choice.

So, the Basic Commands of Kali Linux are given below;

TO KNOW THE USER:  (whoami) or (who) or (users)

FOR VERSION OF KALI LINUX: (uname)

FOR FULL VERSION: (uname -r)

FOR MORE FULL VERSION OF KALI LINUX: (uname -r -a)

TO PRINT WORKING PLACE/DIRECTORY: (pwd)

TO SEE FOLDERS OF WORKING DIRECTORY: (ls)

TO SEE ALL FILES IN WORKING DIRECTORY: (ls -r)

TO SEE EVEN HIDDEN FILES IN WORKING DIRECTORY: (ls -a)

TO KNOW ALL THE PARAMETERS OF A COMMAND: (man + any command to know about it)

TO KNOW THE WORKING DIRECTORY: (ls -R)

TO GO TO SPECIFIC DIRECTORY: (cd + any directory) but first letter of directory should be large when you will write it in command like (cd Desktop)

TO KNOW YOUR DISK PARTITIONS: (lsblk)

FOR MORE INFORMATION OF DISKS: (df)

TO OPEN CALENDER IN TERMINAL: (cal)

TO CHECK DATE: (date)

TO DOWNLOAD DIRECT ANY WEB PAGE: (wget www. +any name.com) for example (wget www.youtube.com).

TO MAKE ANY FOLDER USING TERMINAL: (mkdir + folder name) but there should be no space between name of the folder like (mkdir hassangui)

TO MAKE FILE OF ANY FORMAT USING TERMINAL: (touch + any format) or (type> + any format) for example (touch txt , type> file.txt)

TO PRINT ANY TEXT ON TERMINAL: (echo + any text) i.e. (echo how are you)

TO PRINT A TEXT FROM TERMINAL TO ANY FILE: (echo + any text > file name) for example (echo how are you > file.txt)

TO PRINT A TEXT FROM FILE TO TERMINAL: (cat ./+ file name ) for example (cat ./file.txt)

TO SEE ANY HIDDEN FILE IN A DIRECTORY: (touch .hiddenfile)

TO SEE ALL HIDDEN FILES IN A DIRECTORY: (ls -a)

TO COPY AND PAST A FILE OR FOLDER USING TERMINAL: (cp + fie/folder name +directory ) for example (cp file.txt /home/Desktop)

TO CUT AND PAST A FILE OR FOLDER USING TERMINAL: (mv ./ +file/folder name+ location where you want to past)  for example (cp./file.txt /home/Desktop)

TO RENAME THE FILE: (mv ./+ file name ./+other name) i.e. (mv ./file.txt ./hassan.jpg)

TO DELETE A FILE: (rm ./+file name) for example (rm ./file.txt)

TO REMOVE A FOLDER: (rmdir + folder name) for example (rmdir hassan)

TO COME BACK A STEP IN A DIRECTORY: (cd..)

TO UPDATE AND UPGRADE THE KALI LINUX: (sudo apt-get update), (sudo apt-get upgrade) sudo is used when we are not the root user but when we are super/root user then sudo is not used.

TO GET YOUR INFORMATION: (sudo ifconfig)

TO GET INFORMATION OF A SERVER: (dig +any server) i.e. (dig yahoo.com)

FOR THE MORE INFORMATION OF A SERVER: (dig + ip address of server) for example (dig 193.168.8.2)

TO SEE THE RUNNING TASKS IN KALI LINUX: (ps) or (ps -all) or (ps -r)

TO SEE ALL THINGS RUNNING IN KALI LINUX: (top)

TO CLOSE ANY TASK AND APPLICATION USING THE TERMINAL: (kill +PID of task or application) PID for each task and application is specific and you can see it when you use command (top)

TO PRINT ANY NAME OR TEXT IN LARGE SIZE IN TERMINAL: (figlet + any name or text) for example (figlet Hassan)

TO PRINT A TEXT AGAIN AND AGAIN IN THE TERMINAL: (yes + any text ) for example (yes Hassan) and if you want to stop the printing then press (ctrl +C)

TO MAKE THE FACTORS OF A NUMBER: (factor+ any number) i.e. (factor 64)

TO SHUTDOWN THE KALI LINUX: (shutdown +time -s) for example (shutdown 10 -s) time indicates the seconds after which computer will shutdown

TO RESTART THE COMPUTER: (restart +time -r)

TO KNOW THE HISTORY OF COMMANDS USED: (history)

TO CLEAR THE HISTORY OF COMMANDS: (history -c)

TO INSTALL ANY SOFTWARE ONLINE: (sudo apt-get install + software name) then enter your password of the kali Linux then type (y) always kept in mind that when you use the sudo you must enter your password and password will not appear in the terminal. For example (sudo apt-get install nmap)

TO GIVE ALL PERMISSIONS TO A FILE: (chmod +777+file name) here first + is part of the

command. But there is the question that why we need this command? We know that many

files in the file system are locked and a simple user could not open them. Sometimes we have

permission to read or execute them but we are not permit to write them and often file did not open so we use this command. Moreover, this case is with files that we download from the internet and locked files are often important for hackers in file system. For example we want to give permission to file.txt so (chmod+777 file.txt).

TO CANCELL THE PERMISSION OF FILE: (chmod -777+ file name) but why this command is used? In some files important data is saved so these are locked. To work properly our all files should be accessible in the file system of the kali Linux.

TO SEE THE PERMISSIONS FOR A SIMPLE AND SUPER USER: (ls -la)

                                                  Here are the locked files

TO CHECK IP ADDRESS: (sudo ifconfig)

TO GET TEMPORARY ROOT ACCESS: (sudo su)

TO UNINSTALL ANY SOFTWARE: (sudo-apt get --purge remove +software name), for example   (sudo-apt get --purge remove Metasploit)

TO CLONE ANY SOFTWARE ONLINE: (git clone +link of software) for example (git clone www.youtube.com)

TO EXTRACT A ZIP FILE: (tar -xzy +file name) for example (tar -xzy zip.txt).

Post a Comment

Previous Post Next Post