Linux Pinguino Icons PNG - Free PNG and Icons Downloads

To switch to Superuser (root)
sudo su -
Current directory
pwd
Go back one directory
cd ..
List contents of the folder
ls
See contents without navigating to the etc folder
ls /etc/
Look at some hidden files with file properties
la -la
Remove file
rm hello.txt
Remove folder
rmdir Downloads
Move file
mv <filenmae> <location>
Locate a file
locate <keyword>

Tip : Before using update use command ‘updatdb’ to gather data

To change user password
passwd
To see manual page (gives the manual page for ls) or use ls –help
man ls

Most of the temp folder can rwx file

Tip : most exploits are copied into temp folders to have full permissions.
Full permissions for file permissions
chmod 777 <filename>

chmod +rwx <filename>
Add user
adduser <username>
See etc password folder to see the created user
cat /etc/passwd
root:x:0:0:root:/root:/usr/bin/zsh
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/run/ircd:/usr/sbin/nologin
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
_apt:x:100:65534::/nonexistent:/usr/sbin/nologin
systemd-timesync:x:101:101:systemd Time Synchronization,,,:/run/systemd:/usr/sbin/nologin
systemd-network:x:102:103:systemd Network Management,,,:/run/systemd:/usr/sbin/nologin
systemd-resolve:x:103:104:systemd Resolver,,,:/run/systemd:/usr/sbin/nologin
mysql:x:104:110:MySQL Server,,,:/nonexistent:/bin/false
tss:x:105:111:TPM software stack,,,:/var/lib/tpm:/bin/false
strongswan:x:106:65534::/var/lib/strongswan:/usr/sbin/nologin
ntp:x:107:113::/nonexistent:/usr/sbin/nologin
messagebus:x:108:114::/nonexistent:/usr/sbin/nologin
redsocks:x:109:115::/var/run/redsocks:/usr/sbin/nologin
rwhod:x:110:65534::/var/spool/rwho:/usr/sbin/nologin
iodine:x:111:65534::/run/iodine:/usr/sbin/nologin
miredo:x:112:65534::/var/run/miredo:/usr/sbin/nologin
_rpc:x:113:65534::/run/rpcbind:/usr/sbin/nologin
usbmux:x:114:46:usbmux daemon,,,:/var/lib/usbmux:/usr/sbin/nologin
tcpdump:x:115:120::/nonexistent:/usr/sbin/nologin
rtkit:x:116:121:RealtimeKit,,,:/proc:/usr/sbin/nologin
sshd:x:117:65534::/run/sshd:/usr/sbin/nologin
statd:x:118:65534::/var/lib/nfs:/usr/sbin/nologin
postgres:x:119:123:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash
avahi:x:120:125:Avahi mDNS daemon,,,:/run/avahi-daemon:/usr/sbin/nologin
stunnel4:x:121:126::/var/run/stunnel4:/usr/sbin/nologin
Debian-snmp:x:122:127::/var/lib/snmp:/bin/false
sslh:x:123:128::/nonexistent:/usr/sbin/nologin
nm-openvpn:x:124:129:NetworkManager OpenVPN,,,:/var/lib/openvpn/chroot:/usr/sbin/nologin
nm-openconnect:x:125:130:NetworkManager OpenConnect plugin,,,:/var/lib/NetworkManager:/usr/sbin/nologin
pulse:x:126:131:PulseAudio daemon,,,:/var/run/pulse:/usr/sbin/nologin
saned:x:127:134::/var/lib/saned:/usr/sbin/nologin
inetsim:x:128:136::/var/lib/inetsim:/usr/sbin/nologin
colord:x:129:137:colord colour management daemon,,,:/var/lib/colord:/usr/sbin/nologin
geoclue:x:130:138::/var/lib/geoclue:/usr/sbin/nologin
lightdm:x:131:139:Light Display Manager:/var/lib/lightdm:/bin/false
king-phisher:x:132:140::/var/lib/king-phisher:/usr/sbin/nologin
kali:x:1000:1000:kali,,,:/home/kali:/usr/bin/zsh
systemd-coredump:x:999:999:systemd Core Dumper:/:/usr/sbin/nologin
speech-dispatcher:x:133:29:Speech Dispatcher,,,:/run/speech-dispatcher:/bin/false
john:x:1001:1001:,,,:/home/john:/bin/bash
Tip : See etc/shadow - in most of the cases you ll have chances to find the password from the shadow folder
Tip : If john is in sudoers file he will be able to have priveleges but here he doesn’t belong to sudoers file.
Command network commands
To see ip info, wireless info and icmp response
ifconfig
iwconfig
ping <ipaddress>
Address resolution - to see ip address resolved to mac addresses
arp -a
To see active connections to your computer
netstat -ano
To print the routing table
route
Tip : Pivoting is switching to another network by using a current machine which has access to multiple networks. Route command platys a role in pivoting to see the routing table if the machine could reach another network.

Networking Commands update

Improved version of ipconfig command (Gives ip address subnet mask)
ip -a
To see arp table
ip n
To see routing table
ip r 
To update and upgrade packages
apt update && apt upgrade
Install python3-pip
apt install python3-pip
To fix some issues in the kali 2021.4 and later for things like fixes for impacket, etc.)

https://github.com/Dewalt-arch/pimpmykali.git (Script to fix issues in kali)

git clone https://github.com/Dewalt-arch/pimpmykali
cd pimpmykali
sudo ./pimpmykali.sh

Press 0 to fix the issues. Helpful for many scenarios that needs troubleshooting.

Install gedit (texteditor). You have mousepad or nano or vi
sudo apt install gedit
Ping an ip with only one packet
ping <ip> -c 1 
Ping an ip with only one packet and save output to a file
ping <ip> -c 1 > file.txt
Pull a particular line/phrase from the file
cat ip.txt | grep "64 bytes"
To display only the pinged ip address
cat ip.txt | grep "64 bytes" | cut -d " " -f  4 | tr -d ":"