Commands

Linux commands and notes

Common commands

ls # list files and directories 
ls -la # will list all files including hidden items 
ld ~/(folder name)# to get to a folder without going through all folders 
mkdir # to make folders rmdir to remove folders 
mv # to move files 
locate # to find files…. sometimes you have to use updatedb to update to find files 
passwd # to change the password man : for manual pages
grep # searching within result or file
ps aux  # list proccesses
kill -9 processnumber # kill processes
touch #create files
sudo usermod -aG sudo <username> #Add user to sudoers

Network Commands

ifconfig # show network interfaces and information.
ip # updated version of ifconfig
ip n # gives you the arp table
ip r # gives you the routing table
iwconfig # for wireless configuration
arp -a # shows IP addresses and associated macs
netstat -ano # shows active network connections on the machine.
route # prints your routing table

Writing to Files

Getting files from Github

Searching

List files and sub-folders that are non empty .

Fix Path

Cron jobs

Last updated

Was this helpful?