Intro to Kali Linux
Linux Commands
๐ explainshell.com
๐ Use
TABfor autocompletion
โก๏ธ File System
sudo - run commands and tasks as a superuser or another user, with elevated privileges.
sudo <COMMAND>
# Switch to "root" user
sudo su -pwd - print the current working directory absolute path
pwdcd - change current working directory
# Change dir to user's home dir
cd
# Change dir to parent dir (one level up)
cd ..
# Change dir
cd /home/user
cd /etcls - list current directory contents
mkdir - make a new directory
rmdir - remove a directory
man - manual of a command
echo - display a line of text as output
cat - concatenate files to standard output
> - redirect the output of a command to a file
>> - append the output of a command to a file
rm - delete files/dirs
mv - move/renames files/dirs
cp - copy files and directories
locate - find files by name in a prebuilt database
updatedb - update the locate database
history - show user's history input list
passwd - change user's password
touch - create a new empty file or change existing file timestamp
nano - text editor (other are vi, vim)
mousepad - GUI text editor
โก๏ธ Users & Permissions


r- readw- writex- execute
d rwx r-x r-x 2 syselement syselement 4096 Jun 13 15:01 Desktop
Permissions
1st character -
d/-/l= directory / file / symbolic link2nd block - owner permissions
3rd block - group permissions
4th block - world permissions
-(hyphen) = no permission
File hard links -
#usergroupfile size(bytes)datefile name
chmod - change the mode/permissions of files/dirs
000
0 (0+0+0)
No Permission
---
001
1 (0+0+1)
Execute
--x
010
2 (0+2+0)
Write
-w-
011
3 (0+2+1)
Write + Execute
-wx
100
4 (4+0+0)
Read
r--
101
5 (4+0+1)
Read + Execute
r-x
110
6 (4+2+0)
Read + Write
rw-
111
7 (4+2+1)
Read + Write + Execute
rwx
๐ chmod Calculator
adduser - create a new user
su - switch to another user
/etc/passwd - user's list, shell types, etc
/etc/shadow - user's passwords hashes
/etc/sudoers - sudo configuration directives
sudo -l - list user's privileges or check a specific command
โก๏ธ Network

ip / ifconfig- show/manipulate routing, network devices, interfaces and tunnels
iwconfig - show wireless network interface configuration and status

ip n - display the neighbor/ARP table
arp -a - display ARP cache, IP-to-MAC address mapping
ip r - display the IP routing table (destination networks, gateway IP, net interfaces)
route - display/manipulate the IP routing table

ping - send ICMP ECHO_REQUEST to network hosts, checking network connectivity
netstat / ss - print network connections (e.g. for open ports)
โก๏ธ Services
service - manipulate services

python

systemctl
โก๏ธ Tools
apt update - update the packages list and upgrade installed packages using the APT package manager
apt install - install packages
git - work with Git repository and version control
๐ pimpmykali

Other Tools Install
Bash Scripting & Piping
โก๏ธ Ping Sweep Script
Make a
bashscript that gathers data from apingcommand during a ping sweep network scanning.
grep - print lines that match patterns

Script: Sweep every IP address in a specific subnet network and export only the IPs that respond back.
One liner nmap scan of ips.txt

Last updated
Was this helpful?