I will start with my own experience. I have an old laptop(Dell Lattitude E6410) that I use, so last year I started facing problems with it when Windows started crashing again and again and I finally planned to switch to Linux. As there was no operating system in my laptop and I didn’t have Linux burned USB, so I went to a technical market and asked them to install Linux on my system but nobody was ready to do the same, and on asking the reason everyone was saying that this is used for hacking, that’s why they won’t install. I finally asked one of them to install Windows 10 on my system and I burned the Parrot OS to a USB through Windows 10 and installed Parrot security on my system.
The motive of this story was to tell you that still people think that Linux is only used for hacking. But it is not exactly what it appears to be. Linux is a member of the Open-source-Unix operating system family based on Linux kernels.
Is Linux an OS or a kernel?
Linux OS isn’t exactly what we think it to be and is just a part of the so-called Linux OS. The so-called Linux OS is a “Gnu’s Not Unix” or GNU system developed by the GNU project, and Linux is just a kernel within that system.
What is a kernel?
A kernel is a program that allocates the machine’s resources to other programs that are running on the computer. The kernel is like knowledge and GNU is action, as knowledge is useless without action, same is with GNU the kernel alone can’t function; that is why Linux is called GNU Linux.
How hard is it to use Linux?
Linux is not hard from any angle of its usage; the only requirement is to know how to use a shell. If you want to use Linux then you must know some commands that’ll help you in breaking the stigma that it’s hard to use Linux.
Basic commands:
-> Know your system
arch
: It’ll print the computer architecture.
date
: shows system time and date.
dmidecode
: it parses SMBIOS data
uname
: It displays system information.
hdparm
: shows information about the hard disk.
lspci
: shows PCI devices.
lsusb
: Shows USB devices.
-> How to go out of the session?
shutdown now
: Shutdown the system
shutdown -h hours: minutes &
: schedule system shut down.
shutdown -c
: cancels a scheduled system shutdown
shutdown -r now
: restart now
reboot
: reboot
logout
: logout from the current user
-> My files
cd
: to enter in root directory
cd /home
: to enter into the home directory. Make ls
to list user space.
cd ..
: go to a directory that is one level back
cd ../..
: go to a directory that is two levels back
cd -
: to go to the previous directory.
pwd
: shows the path of the current directory.
ls
: list all the files and directories in the current working directory.
ls -F
: to list only files in the working directory.
ls -l
: to show the details of the files and directories in the current working directory.
ls -a
: to show all hidden files.
tree
: shows all files and directories from root to last created file/directory in a tree format.
Can’t show so do try it on your own machine
mkdir
: to make a new directory.
rm -f filename
: delete a file
rmdir directory name
: remove a directory
mv initial_dir_name final_dir_name
: this change the name of the directory.
mv initial_file_name final_file_name
: this changes the name of a file
cp filename destination_path
: copy a file into a directory different than it’s own
cp -a directory destination_path
; copy a directory into another directory
locate filename
: locate the path of any file
-> Other important commands:
df -h
: displays a list of mounted partitions
ls -lSr|more
: it’ll show the size of the files and directories ordered by size.
passwd
: Used to change the password.
chmod +x filename
: to make a file executable
sudo yum install package_name
: to install a package in feroda and RedHat distribution
sudo dpkg -i package.deb
: to install locally available Debian package on Debian distribution.
sudo apt install package_name
: to install a package on Debian distribution-based system
sudo apt update
: update all packages list on Debian.
sudo apt upgrade
: upgrade all installed Debian packages.
cat
: to print the content of a file onto the standard output stream.
ifconfig
: to know about the network information.
If you are using Linux for the purpose to do pentesting then you must have the following tools:
- NMAP: NMAP or network mapper is a network auditing tool used to discover host, port, OS fingerprinting, port, and vulnerability detection.
- Hydra: Hydra is known to be the best network login information cracker. It supports numerous protocols like FTP, HTTPS, LDAP, MySQL, SSH, Telnet, etc.
- Metasploit: Metasploit framework has so many modules against the huge different cross platforms, devices, or services. It has mainly five modules, Exploit, Payload, Auxilary, Encoders, and Post.
- OWASP ZAP/Burpsuite: Everyone has his/her own choice between OWASP ZAP and Burpsuite but both of them are best for web scanning, intercepting, attacking, and requesting.
- Wireshark: Wireshark is a network protocol analyzer, or an application that captures packets from a network connection
I hope this article will help you understanding what linux is and how it should be used.