Linuxkommandon

Linux

zcat
ugrep
netstat command
netstat command examples
How to Manage Processes from the Linux Terminal: 10 Commands You Need to Know

gpasswd
dumpcap (Wireshark)

Ubuntu-kommandon

Ta reda på vilken Ubuntu-version du kör:

lsb_release -a

Kontrollera versionen på ett installerat paket:

dpkg -s paketnamn

RM

Tar bort filer och mappar.

rm [alternativ] [filnamn/mappnamn]

rm -r [mappnamn]    - Tar bort alla mappar och filer i angiven mapp inklusive den angivna mappen. Används för att ta bort ett mappträd.

Exempel: rm -r testmapp

rm - Remove files (delete/unlink)

Snabbguide till hur du packar upp komprimerade filer

Hur packar jag upp en .tar.gz-fil?

tar -xvzf file.tar.gz

Hur packar jag upp en .tar.bz2-fil?

tar -xvjf file.tar.bz2

Hur packar jag upp en .tar.xz-fil?

tar -xvJf file.tar.xz

Hur packar jag upp en .tgz-fil?

tar -xvzf file.tgz

Hur packar jag upp en .xz-fil?

tar -xvJf file.xz

Hur packar jag upp en .gz-fil?

gunzip file.gz

eller

gzip -d file.gz

Hur packar jag upp en .bz2-fil?

bunzip2 file.bz2

eller

bzip2 -d file.bz2

Hur packar jag upp en .zip-fil?

unzip file.zip

Mer info:
GNU tar manual - Creating and Reading Compressed Archives
How do I uncompress a tarball that uses .xz?

Compress file(s) into a .bz2 or .tar.bz2 file

Just to explain a bit further, a single file can be compressed with bzip2 thus:

bzip2 myfile.txt

tar is only required when compressing multiple files:

tar -cvjf myfile.tar.bz *.txt

Hence, when uncompressing a .bz2 file use bunzip2,
when uncompressing a tar.bz2 file use tar -xvjf.

Source:
How to decompress a .bz2 file

How to check disk & file space usage

df -h     - Report file system disk space usage

du     - Estimate file space usage

Sources:
Check your disk usage with df and du
Check Disk Space in Linux

Nmap

nmap -sS -O remote PC/server IP address

Example: nmap -sS -O 192.168.0.100

How to check Kernel version

uname -r     - This command displays the Kernel version the Linux distro OS is using

Formatera partition

mkfs.ext4 /dev/sdcX

eller, för vfat32:

mkfs.vfat -T 32 /dev/sdcX

Visa filsystem på monterade volymers partitioner

df -T

Visa monteringspunkter

df -h

eller:

mount

rm

rm -r

history

history -c  Deletes all entries from the command environment history

whoami
pwd
mkdir
ls
cp
rm
rmdir
cat
grep
top
htop
ps
pstree
kill
pgrep
pkill
killall
renice
xkill
history
lsof -i
ifconfig

hostname – show or set the system’s host name
domainname – show or set the system’s NIS/YP domain name
dnsdomainname – show the system’s DNS domain name
nisdomainname – show or set system’s NIS/YP domain name
ypdomainname – show or set the system’s NIS/YP domain name

Källa: Linux: find out information about current domain name and host name

Deprecated Linux networking commands and their replacements

Deprecated commandReplacement command(s)
arpip n (ip neighbor)
ifconfigip a (ip addr), ip link, ip -s (ip -stats)
iptunnelip tunnel
iwconfigiw
nameifip link, ifrename
netstatss, ip route (for netstat-r), ip -s link (for netstat -i), ip maddr (for netstat-g)
routeip r (ip route)

Source: Deprecated Linux networking commands and their replacements  (Doug Vitale Tech Blog)