Linux Commands
aliasAlias
aptAdvanced Package Tool
apt install
apt-get update && apt-get upgrade
apt-get update
apt-get upgrade
apt-get install motion
apt-get install mplayer chromium-browser
apt-get remove mplayer(leaves conf files)
apt-get purge mplayer(uninstall package & remove conf files)
apt-get autoremove
apt-get clean
apt-get dist-upgrade
apt-cache search kde
apt-cache search -n kde
apt-cache search -n ^kde
apt-cache showpkg kde-full
bzip2bzip2
calDevice Files
catConfiguration Files
The linux command cat - to concatinate files to standard output
-A --show-all
-b number all nonempty output lines, starting with one
-e -E
-n -number
-s -squeeze-blank
-T
-u
-v
cdHome Folders
chmodChange file permissions
chownUsed to change the user or group that owns a file
commThe linux command comm - finds identical lines - comm file1 file2
cpCopy
dateOptional Packages
diffKernel & Process Files
The linux command diff - compares files and finds differences - diff file1 file 2
dmesgRoot Home Directory
duApplication State Files
emacsSystem Administration Binaries
findSELinux Virtual File System
The linux command find - slow leniar searching function
freeService Data
grepThe linux command grep - searches strings of text in files
grep "sometext" *
groupaddTemporary Files
groupdelUser Binaries & Read-Only Data
groupmod
gzip
head
hello
ifconfigtemporarary IP address assignment
sudo ifconfig ens33 192.168 netmask 255.255
ifdownbring down ens33 - sudo ifdown ens33
ip
kill
lessThe search function, newer, more features
lnCreates links between files
locate
lslists content of directory
make
man
mkdir
more
mountmount a remote file system as a directory
mtr
mvrename a file or move a file
nano
netstat
Linux Netstat Command
This command will reveal if aplications are listening for network connections.
netstat -g Displays the multicast groups configured
netstat -n Displays ports
netstat -iDisplays the interfaces configured by ifconfig
netstat -sLists a summary of activity for each protocol
netstat -cUpdates output every second (for troubleshooting)
netstat -vGives verbose output, listing both active and inactive sockets
netstat -eGives verbose output for active connections only
netstat -CDisplays information from the route cache and is good for looking at past connections
netstat -tap | grep smb
netstat -tuapn
niceThe linux command nice - for setting priority - sudo nice -19 - maximum priority -20 - normal priority 0 - minimum priority 19 - renice to reset priority
nmcli
passwdCommand that creates or modifies a user password, also file that stores the list of all linux user accounts
ping
pslists the current system processes
pwd
reboot
resolv.confDNS Server
rmremove file
rmdir
routeShows Default Gateway
scpsecure copy to another linux computer
service
short
shutdown
ssh
su
sudo
tail
tar
top
touch
traceroute
tree
useradd
userdel
usermod
which
xargs
:wqSave and quit
/searches in vim
(echo Server: && hostname && echo -ne "\n" && ip addr) > /share/host-ip-info.txt
nano /etc/network/interfaces
iface eth33 inet static
address 192.168.239.146
netmask 255.255.255.0
gateway 192.168.239.2
broadcast 192.168.239.255
network 192.168.239.0
dns-nameservers 4.4.4.4 8.8.8.8
dns-search example.local
Back to index