
Linux users always love to work with the terminal rather than the Graphical user interface, using the terminal isn’t fancy but fast, In this post, we will be discussing the most used Linux Commands that you should know, these commands will surely increase your productivity and save your valuable time, one thing to consider is you may feel familiar with the commands but less used
As a pentester, we use Kali Linux or Parrot Os and our goal is to introduce the most used commands for better productivity and will be usable on almost all Linux Distributions
Kali Linux basic commands
OS Release Check
cat /etc/os-release
We use this command quite often to check the version and release notes of our operating systems
cat
Cat command is used to read the files in the terminal itself, you can read text files or bash scripts etc
all you have to type the command along with the file, eg cat file.txt
Ping
ping google
the ping command is used to check the status of the service, but most of us use this command to check our internet connection or to get the IP address of the website
ifconfig
ifconfig
used to find out your local machine’s IP address, MAC address, and many other routing addresses
host
host google.com
Host command is used for DNS lookup
dig
dig google.com
dig command also used for Gathering Domain Name System Information
nslookup
nslookup google.com
This command also fulfils the same purpose as dig and host
curl
curl
curl is used to send HTTP requests to the host using your terminal, it also supports many other network protocols such as FTP, you can download files using curl but not likely recommended
wget
wget
Wget command is used to download the files from any URL, it also supports HTTP, HTTPS, FTP etc
grep
grep
This command is used extracting text from a file, it can be combined with regular expressions, we use it to extract URLs from files, you can use as per your requirements
ls
ls
ls command is used to display all the Files and Folders in
pwd
ls
pwd command is used to print the Present Working Directory
cd
cd home
the cd command is used to Change the Working directory, it helps us to move from one folder to another folder within the terminal
mkdir
mkdir
mkdir command is used to create a new folder, eg mkdir test
will create a new folder named test
cp
cp
cp command is used to copy the files from one folder to another, eg cp file /tofolder
mv
mv
mv command is used to Rename files and move files from one folder to another folder
rm
rm
the rm command is used to remove/delete files, it can also be used to remove folders with their content eg, rm -rf folder
rmdir
rmdir is similar to rm, it deletes the empty folders
chmod
chmod
chmod is used to give different permissions to files, usually read, write, execute
find
find
find command is used for finding the files, it prints the path if the file exists
locate
locate
Locate command is servers the same as find command
vim
vim
Vim is a file editor, it works inside the terminal, it’s not a difficult tool to use but most beginners are stuck here
nano
nano
Nano is also a text editor and it also works inside the terminal
touch
touch
the touch command is used to create a new empty file
top
top
commands will display the running programs in real-time
ps
ps
ps is similar to top and will display the running processes
kill
kill
the command kill is used to end the process by giving the service name or process id
history
history
The history command is used to display the previously typed command in the terminal
sort
sort
the sort command is used to arrange the items in a particular order
zip
zip
zip command is used to zip files and folders
unzip
unzip
unzip command is used to unzip a zipped file
>> this command can be used to save the output from the terminal in a file eg: whoami >> text.txt
We have shared the Kali Linux basic commands, which one should be familiar with and there are many other commands out there, you can explore them on your own
Here are some of the useful Sheetsheets shared by the Infosec Community