Du må være registrert og logget inn for å kunne legge ut innlegg på freak.no
X
LOGG INN
... eller du kan registrere deg nå
Dette nettstedet er avhengig av annonseinntekter for å holde driften og videre utvikling igang. Vi liker ikke reklame heller, men alternativene er ikke mange. Vær snill å vurder å slå av annonseblokkering, eller å abonnere på en reklamefri utgave av nettstedet.
  16 2956
Jeg har i det siste skrevet inn nyttige kommandoer jeg bruker ofte i en notatfil på linux-maskinen min.

Jeg tenkte flere kanskje kan ha nytte av dette, så da spør jeg her,
hvilke linux kommandoer/verktøy (i terminalen) er det du bruker mest? Er det noe nyttig jeg ikke har nevnt i filen? :-)

Kode

# Tips & useful commands
watch -n 1 -d <command> # run a command periodically and show the output, -n specifies interval, -d highlights changes.
ctrl-x e # Invoke a editor to write a tricky long command.
reset # Fixed a broken terminal.
ssh-copy-id user@host # Copy SSH public keys to host to enable password-less SSH logins.
sudo <command> # DANGEROUS Run a command as root, requires you to be in /etc/sudoers or a group that is, DANGEROUS.
sudo !! # DANGEROUS. Run the last command as root. DANGEROUS
column -t # Pipe any command to column -t to get a nice aligned output.
apropos <word> # Search man pages.
lsof -p <PID> # See what files a process has open.
ps auxww -H # See all processes, with params + hierarchy.
pgrep -fl node # See all node-related PIDs and processes.
cd - # Change to last working dir
strace -f -p <PID> # See what a process is doing (system calls), -f traces child processes (results of fork()), -p specify pid.
tail -f file.log | grep 10.0.0.1 # Monitor a log file (or any file) for a string.
!!:gs/foo/bar # Run previous command, replacing foo with bar everytime foo occurs.
ctrl+u [...] ctrl+y # type partial command, kill this command, check something you forgot, yank the command, resume typing.
                    # Example :
                    # vim /etc/fstab
                    # Woops, forgot sudo!
                    # <ctrl+u> sudo <ctrl+y>
                    # sudo vim /etc/fstab
ps aux | sort -nk +4 | tail # Display the top 10 running processes, sorted by memory usage.
ping -i 60 -a <ip> # Sound an audible bell alarm when a host comes online, useful for when you are waiting for something to reboot. -i is interval, -a is audible bell.
history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head # Get the 10 most uses commands from your history.

# Tools
htop # Instead of top, htop is a process manager/monitor.
ranger # File manager, vim-style.

# Disk
iostat -xnk 5 # Check read/writes per disk -x is extended statistics, -n shows NFS header row, -k displays statistics in kilobytes per second instead of blocks. Use -m for megabytes per second, 5 is the interval (must be installed, in apt package sysstat) 
df -h # Display an overview of all disks
du -hs # Display disk usage of this directory and all sub-directories.
find . -size +100M # Find all files in current directory over 100M.

# Memory
free -m # Show free memory, -m displays in megabytes. Learn how to read memory at: http://www.linuxatemyram.com/
cat /proc/meminfo # See information about memory

# Network
ssh -N -L2001:localhost:80 somehost # Start a tunnel from somehosts port 80 to localhost 2001. (You can go to http://localhost:2001 to hit somehost:80)
python -m SimpleHTTPServer 8080 # Serves the local directory from 8080.
lsof -i # Monitors network connections in real time.
nethogs # Shows the bandwidth usage per process. (must be installed)
netstat -tnlp # List all listening ports with PID of process.
mtr google.com # mtr is better than traceroute and ping combined.
lsof -nPi tcp # See all TCP sockets in use, -n disables hostname lookup (makes lsof faster), -P disables port name lookup, -i is used for matching addresses/protcols, like tcp.
curl -LI http://google.com # -I display HTTP headers, -L follow redirects.
iftop # Show traffic by port, install required, uses pcap.


# Performance
vmstat 1 # See state of your system, are we swapping? 1 is interval to call.
time <command> # See how long a command takes to execute.

# Vim commands
:w !sudo tee % # Save a file you edited in vim without the needed permissions.
Kommer til å oppdatere filen ettersom folk kommer med forslag.
https://gist.github.com/01d8fb3d3a9b4b146bf1
Sist endret av flexd; 12. januar 2013 kl. 12:50.
(ノಠ益ಠ)ノ彡┻━┻
Alphanio's Avatar
"uname -a" for å få opp linux kjerne og distro?
"cat" kommandoen leser bare opp i ren text så den kan du bruke på hvilken som helst fil.
bruker ofte bare "su" da jeg ikke bruker ubuntu og ikke "sudo".
"ps -x" for å få opp prosesser.
"kill -9 x" (x=prosess id i tall) for å drepe prosessen.
"chown" for å bytte owner
"ls -alh" utvidet ls kommando for å kunne sjekke owner samt få filstørrelse i MB i stedet for bytes.
"vi filnavn" for å editere med Vim.
"nano filnanv" for å editere med Nano.

Er også nytting å vite hvordan filsystemet er oppbygd.
/ root directory
/mnt = diverse mounts
/etc = program og configer
/home = hjemme directory
/etc/.init program du kan starte og stoppe
/dev = devicer som sata kontroller, nettverksdrev etc.
osv..

Det finnes så mange flere og man trenger stort sett ikke noe desktop for å kunne bruke linux på en fornuftig måte.
Blir som DOS bare mye mye flere muligheter.

Glemte å nevne disse:

"chmod" for å endre tilgang til filen.
"ping" for å sende pakker til ip adresse som i windows.
"ifconfig" for å sjekke din egen ipadresse.
"if up eth0" for å starte ethernet adapter0
"if down eth0" for å stoppe nettverk.
"dpkg -i pakkenavn.deb " for å installere deb pakke (debian og ubuntu)
"apt-cache search pakkenavn" (debian og ubuntu)
"apt-get update" for å oppdatere pakke respitoaret (debian og ubuntu)
"apt-get install pakkenavn" for å installere pakke. (debian og ubuntu)
Kan komme med flere med men disse er jo basic og gode?
Sist endret av Alphanio; 12. januar 2013 kl. 13:08.
Et par jeg bruker ofte:

du -hs * | sort -n -r #viser størrelse på undermapper, sortert fra minst til størst
ctrl+r #søke i bash history

ellers er det gull å bookmarke denne og søke i dokumentet når man trenger tips til en spesifikk kommando: http://cb.vu/unixtoolbox.xhtml
En av mine favoritter (som ikke er så kjent) er ^gammel^ny^. Denne kan brukes for å rette opp i skrivefeil i kommandoen over, men også til småting som eksemplene under.

Eksempel 1:
# mkfs.ext4 /dev/sda1
# ^sda^sdb^
Kommandoen "mkfs.ext4 /dev/sdb1" blir da kjørt. Legg merke til at sda1 ble til sdb1.

Eksempel 2:
# umount /mnt/usb
# ^u^^
Kommandoen "mount /mnt/usb" blir kjørt. Veldig greit om man har en screen oppe, må unmounte, gjøre endringer, og så mounte igjen.
Sist endret av Starra; 12. januar 2013 kl. 15:34.
Tittelninja
flexd's Avatar
Trådstarter Donor
Sitat av Starra Vis innlegg
En av mine favoritter (som ikke er så kjent) er ^gammel^ny^. Denne kan brukes for å rette opp i skrivefeil i kommandoen over, men også til småting som eksemplene under.

Eksempel 1:
# mkfs.ext4 /dev/sda1
# ^sda^sdb^
Kommandoen "mkfs.ext4 /dev/sdb1" blir da kjørt. Legg merke til at sda1 ble til sdb1.

Eksempel 2:
# umount /mnt/usb
# ^u^^
Kommandoen "mount /mnt/usb" blir kjørt. Veldig greit om man har en screen oppe, må unmounte, gjøre endringer, og så mounte igjen.
Vis hele sitatet...
Dette har jeg nevnt allerede :-)
lete i ~/.bashrc


alias e='exit'
alias lsof='lsof -Pnl +M -i4'
alias lsofl='lsof -Pn | grep LISTEN'
alias isg='pacman -Qs'
alias cr='crontab -e'
alias crl='crontab -l'
alias a='alias'
alias ag='alias | grep'
alias as='source ~/.bashrc'
alias aa='nano ~/.bashrc'
alias bt='sudo shutdown -r 0'
alias cb='cd ..'
alias cl=' cd / && clear'
alias cle='clear'
alias cc='conky -c'
alias ds='dropbox start'
alias dsd='dropbox status'
alias dss='dropbox stop'
alias font='sudo fc-cache -fv'
alias g='grep'
alias ge='gedit'
alias h='history'
alias hg='history | grep'
alias i='screenfetch'
alias ip='curl 'ifconfig.me''
alias isg='pacman -Qs'
alias ka='killall'
alias kat='killall tint2'
alias kv='killall vlc'
alias kc='killall conky'
alias kco='killall cairo-dock'
alias kd='pkill -f deluge'
alias kf='killall firefox && killall firefox-bin && killall plugin-container'
alias kax='killall xfce4-panel'
alias km='killall gnome-mplayer'
alias kav='killall virtualbox'
alias lsof='lsof -Pnl +M -i4'
alias lsofl='lsof -Pn | grep LISTEN'
alias lg='ls | grep'
alias mc='sudo update-alternatives --config x-cursor-theme'
alias mi='sudo mount -o loop -t iso9660'
## ubuntu
alias ml='gconftool-2 --set /apps/metacity/general/button_layout --type string close,maximize,minimize:menu'
alias mr='gconftool-2 --set /apps/metacity/general/button_layout --type string

alias mt1='truecrypt --mount ~/Dropbox/Files/bs4 /media/truecrypt1'
alias mu1='truecrypt --dismount /media/truecrypt1'
alias nh='sudo nethogs wlan0'
alias ns='sudo netstat -plntu'
alias 0='optirun'
alias p='ping -c 3 vg.no'
alias pg='ps aux | grep'
alias pri='primusrun'
alias ps='ps aux'
alias pt='sudo powertop'

alias s0='sudo shutdown -P 0'
alias s='sudo'
alias s!='sudo !!'
alias sn='sudo nano'
alias sg='gksudo gedit'
alias sc='sudo pacman -Rs $(pacman -Qqtd)'
alias scr='cdf && scrot -q 100 -c -d 4'
alias s0='sudo shutdown -P 0'
alias s='sudo'
alias s!='sudo !!'
alias sn='sudo nano'
alias sg='gksudo gedit'
alias sc='sudo pacman -Rs $(pacman -Qqtd)'
alias scr='cdf && scrot -q 100 -c -d 4'
alias si='sudo pacman -S'
alias sr='sudo pacman -Rs'
alias sp='sudo pacman -Rns'
alias ss='pacman -Ss'
alias sas='pacman -Si'
alias sw='sensors'
alias sx='sudo pacman -Syyu'
alias sxx='yaourt -Syua'
alias ta='tail -F -v /var/log/syslog'
alias tim='timidity -iA -Os'
alias ti='timidity -Ow'
alias th='htop'
alias tt='top'
alias ttg='top | grep'
alias ud='sudo updatedb -v'
alias yo='yaourt'
alias yor='yaourt -R'
alias yq='yaourt -Q'
alias yd='youtube-dl -t --rate-limit=250k'
alias yd4='youtube-dl -t --rate-limit=420k'
alias w='wget -c'
alias w1='wget -c --limit-rate=10k'
alias w2='wget -c --limit-rate=12k'
alias w3='wget -c --limit-rate=13k'
alias w4='wget -c --limit-rate=14k'
alias w5='wget -c --limit-rate=15k'
alias w6='wget -c --limit-rate=16k'
alias we='wget -c --limit-rate=250k'
alias we4='wget -c --limit-rate=410k'
alias wpdf='cdw && html2pdf'

## old gnome stuff
alias wz='gconftool-2 -t string -s /desktop/gnome/background/picture_options "zoom"'
alias ws='gconftool-2 -t string -s /desktop/gnome/background/picture_options "stretch"'

alias wsc='gconftool-2 -t string -s /desktop/gnome/background/picture_options "scale"'
alias wc='gconftool-2 -t string -s /desktop/gnome/background/picture_options "center"'

alias wx='optirun wine /home/zx/.wine/drive_c/Program\Files\(x86)/Ubisoft/XIII/system/XIII.exe'

alias xh="cat /home/zx/.xchat2/xchatlogs/irc.spotchat.org-#linuxmint-help.log | grep"
alias xo='xdg-open'
alias xu='cat /home/zx/.xchat2/xchatlogs/Ubuntu\ Servers-#xubuntu.log | grep'
alias xuh='cat /home/zx/.xchat2/xchatlogs/Ubuntu\ Servers-#xubuntu-offtopic.log | grep'
alias 0='xcalib -c'
alias 1='xcalib -co 10 -a'
alias 2='xcalib -co 20 -a'
alias 3='xcalib -co 30 -a'
alias 4='xcalib -co 40 -a'
alias 5='xcalib -co 50 -a'
alias 6='xcalib -co 60 -a'
alias 7='xcalib -co 70 -a'
alias 8='xcalib -co 80 -a'
alias 9='xcalib -co 90 -a'

Sitat av Skrue Vis innlegg
lete i ~/.bashrc


alias e='exit'
alias lsof='lsof -Pnl +M -i4'
alias lsofl='lsof -Pn | grep LISTEN'
alias isg='pacman -Qs'
alias cr='crontab -e'
alias crl='crontab -l'
alias a='alias'
alias ag='alias | grep'
alias as='source ~/.bashrc'
alias aa='nano ~/.bashrc'
alias bt='sudo shutdown -r 0'
alias cb='cd ..'
alias cl=' cd / && clear'
alias cle='clear'
alias cc='conky -c'
alias ds='dropbox start'
alias dsd='dropbox status'
alias dss='dropbox stop'
alias font='sudo fc-cache -fv'
alias g='grep'
alias ge='gedit'
alias h='history'
alias hg='history | grep'
alias i='screenfetch'
alias ip='curl 'ifconfig.me''
alias isg='pacman -Qs'
alias ka='killall'
alias kat='killall tint2'
alias kv='killall vlc'
alias kc='killall conky'
alias kco='killall cairo-dock'
alias kd='pkill -f deluge'
alias kf='killall firefox && killall firefox-bin && killall plugin-container'
alias kax='killall xfce4-panel'
alias km='killall gnome-mplayer'
alias kav='killall virtualbox'
alias lsof='lsof -Pnl +M -i4'
alias lsofl='lsof -Pn | grep LISTEN'
alias lg='ls | grep'
alias mc='sudo update-alternatives --config x-cursor-theme'
alias mi='sudo mount -o loop -t iso9660'
## ubuntu
alias ml='gconftool-2 --set /apps/metacity/general/button_layout --type string close,maximize,minimize:menu'
alias mr='gconftool-2 --set /apps/metacity/general/button_layout --type string

alias mt1='truecrypt --mount ~/Dropbox/Files/bs4 /media/truecrypt1'
alias mu1='truecrypt --dismount /media/truecrypt1'
alias nh='sudo nethogs wlan0'
alias ns='sudo netstat -plntu'
alias 0='optirun'
alias p='ping -c 3 vg.no'
alias pg='ps aux | grep'
alias pri='primusrun'
alias ps='ps aux'
alias pt='sudo powertop'

alias s0='sudo shutdown -P 0'
alias s='sudo'
alias s!='sudo !!'
alias sn='sudo nano'
alias sg='gksudo gedit'
alias sc='sudo pacman -Rs $(pacman -Qqtd)'
alias scr='cdf && scrot -q 100 -c -d 4'
alias s0='sudo shutdown -P 0'
alias s='sudo'
alias s!='sudo !!'
alias sn='sudo nano'
alias sg='gksudo gedit'
alias sc='sudo pacman -Rs $(pacman -Qqtd)'
alias scr='cdf && scrot -q 100 -c -d 4'
alias si='sudo pacman -S'
alias sr='sudo pacman -Rs'
alias sp='sudo pacman -Rns'
alias ss='pacman -Ss'
alias sas='pacman -Si'
alias sw='sensors'
alias sx='sudo pacman -Syyu'
alias sxx='yaourt -Syua'
alias ta='tail -F -v /var/log/syslog'
alias tim='timidity -iA -Os'
alias ti='timidity -Ow'
alias th='htop'
alias tt='top'
alias ttg='top | grep'
alias ud='sudo updatedb -v'
alias yo='yaourt'
alias yor='yaourt -R'
alias yq='yaourt -Q'
alias yd='youtube-dl -t --rate-limit=250k'
alias yd4='youtube-dl -t --rate-limit=420k'
alias w='wget -c'
alias w1='wget -c --limit-rate=10k'
alias w2='wget -c --limit-rate=12k'
alias w3='wget -c --limit-rate=13k'
alias w4='wget -c --limit-rate=14k'
alias w5='wget -c --limit-rate=15k'
alias w6='wget -c --limit-rate=16k'
alias we='wget -c --limit-rate=250k'
alias we4='wget -c --limit-rate=410k'
alias wpdf='cdw && html2pdf'

## old gnome stuff
alias wz='gconftool-2 -t string -s /desktop/gnome/background/picture_options "zoom"'
alias ws='gconftool-2 -t string -s /desktop/gnome/background/picture_options "stretch"'

alias wsc='gconftool-2 -t string -s /desktop/gnome/background/picture_options "scale"'
alias wc='gconftool-2 -t string -s /desktop/gnome/background/picture_options "center"'

alias wx='optirun wine /home/zx/.wine/drive_c/Program\Files\(x86)/Ubisoft/XIII/system/XIII.exe'

alias xh="cat /home/zx/.xchat2/xchatlogs/irc.spotchat.org-#linuxmint-help.log | grep"
alias xo='xdg-open'
alias xu='cat /home/zx/.xchat2/xchatlogs/Ubuntu\ Servers-#xubuntu.log | grep'
alias xuh='cat /home/zx/.xchat2/xchatlogs/Ubuntu\ Servers-#xubuntu-offtopic.log | grep'
alias 0='xcalib -c'
alias 1='xcalib -co 10 -a'
alias 2='xcalib -co 20 -a'
alias 3='xcalib -co 30 -a'
alias 4='xcalib -co 40 -a'
alias 5='xcalib -co 50 -a'
alias 6='xcalib -co 60 -a'
alias 7='xcalib -co 70 -a'
alias 8='xcalib -co 80 -a'
alias 9='xcalib -co 90 -a'
Vis hele sitatet...
ok, 2 poster da.

alias a='alias'
alias ag='alias | grep'
alias as='source ~/.bashrc'
alias aa='nano ~/.bashrc'
alias bt='sudo shutdown -r 0'
alias cb='cd ..'
alias cl=' cd / && clear'
alias cle='clear'
alias cdb='cd /media/data/bones && ls'
alias cdd='cd /media/data/download && ls'
alias cdf='cd /media/data/firefox && cle'
alias cde='cd /etc && ls'
alias cdi='cd ~/Dropbox/images && ls -t'
alias cdl='cd /var/log && ls'
alias cdr='cd /media/data/radio && ls'
alias cds='cd /etc/apt/sources.list.d && ls'
alias cdw='cd /media/data/bones/00xxWebpages'
alias cc='conky -c'
alias c10='cp /media/data/scripts/conky/conkyrc10 /home/zx/.conkyrc'
alias c11='cp /media/data/scripts/conky/conkyrc11 /home/zx/.conkyrc'

og..

alias cr='crontab -e'
alias crl='crontab -l'
alias d='df -h'
alias dc=' /usr/bin/setxkbmap -option "ctrl:nocaps"'
alias ds='dropbox start'
alias dsd='dropbox status'
alias dss='dropbox stop'
alias dw='watch -n 1 "dropbox status"'
alias dp='cp /home/zx/.bashrc /home/zx/Dropbox/Files && cp /media/data/scripts/* /home/zx/Dropbox/files/ && cp /home/zx/Dropbox/* /media/data/bones/Dropbox/'
alias dom='strings ~/.mozilla/firefox/*/webappsstore.sqlite|grep -Eo "^.+\.:" |rev | sort -u'
alias dns='cat /etc/resolv.conf'
alias dnx='sudo cp /media/data/bones/resolv.conf /etc/resolv.conf && dns'

det ble mye drit i tillegg. Beklager.

Kode

ls /bin

Kode

ls /usr/bin
kjør man på hvilken som helst av svarene på de 2 over, feks

Kode

man mkdir
Sist endret av nudo; 13. januar 2013 kl. 07:55.
Mye som er nevnt nå, men kan legge til:

Kode

alias ipme='curl ifconfig.me/ip'
alias iphost='curl ifconfig.me/host'
alias ipall='curl ifconfig.me/all'
Om noen har lyst å få et litt mer fiffig shell, så kan dere ta en titt på zshell og https://github.com/robbyrussell/oh-my-zsh
Queen of Blades
Jonta's Avatar
DonorCrew
Som introduksjon anbefaler jeg alltid linuxcommand.org:Learning the Shell (finnes ved å google "learn shell").

commandlinefu.com er også en fin greie, med forklaringer og opp- og nedstemming av kommandoer.

Kode

clear
Gir «ren» kommandolinje. "clear the terminal screen".

Kode

acpi
Viser batteristatus.

Kode

alsamixer
Kontrollere lyd, både inn- og utgående. (Har dessverre ikke funnet en måte å gå over 100% på. Dét bruker jeg fortsatt gnome-sound-applet til. Skrik ut om du vet en måte i terminal.)

Kode

killall prosessnavn
I stedet for å finne ut prosess-ID først. Kan tab-completes, så fungerer også som provisorisk måte å finne alle kjørende prosesser på.

Kode

sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get autoremove && sudo apt-get autoclean
Oppdatere det som er. Finner den med Ctrl+R (^R) som moridin nevnte. Bør nok legges inn som alias. (Oppdaterer ikke distroversjon)

Kode

ls -1R | grep -i .*.JPG | wc -l
Teller alle .JPG-filer i en mappe og alle undermapper.
Tittelninja
flexd's Avatar
Trådstarter Donor
Sitat av Skrue Vis innlegg
SNAPP .
Vis hele sitatet...
Nå tenkte jeg primært på nyttige kommandoer man burde kunne da.

Ikke åpenbare ting som ls, mkdir osv. Og ikke en haug merkelige aliases.
Sitat av flexd Vis innlegg
Nå tenkte jeg primært på nyttige kommandoer man burde kunne da.

Ikke åpenbare ting som ls, mkdir osv. Og ikke en haug merkelige aliases.
Vis hele sitatet...
ok, sudo !!

ser på historien din. Du er ikke akkurat stor.
Tittelninja
flexd's Avatar
Trådstarter Donor
Sitat av Skrue Vis innlegg
ok, sudo !!

ser på historien din. Du er ikke akkurat stor.
Vis hele sitatet...
Hva mener du?
Sitat av flexd Vis innlegg
Dette har jeg nevnt allerede :-)
Vis hele sitatet...
Nei, du har nevnt replace all, jeg har nevnt replace first (som jeg har glemt å spesifisere, kremt). :-)
Tittelninja
flexd's Avatar
Trådstarter Donor
Sitat av Starra Vis innlegg
Nei, du har nevnt replace all, jeg har nevnt replace first (som jeg har glemt å spesifisere, kremt). :-)
Vis hele sitatet...
Godt poeng. g (i gs) står for global ja. Skal nevne det i fila :-)
pgrep(1) og pkill(1) er nyttige kommandoer, IMHO.
Cowboy Coder
bc(1) er en ordinær kalkulator som er laget for terminal bruk. Finnes også dc(1) som er RPN varianten, for de som liker det.

Jeg ser ikke at noen har nevnt nc(1)? eller "netcat" som den normalt kalles. Det er et lite program for å operere rett på TCP og UDP sockets, og kan brukes til mye rart som å teste nettverksforbindelser og sette opp enkle proxy servere.
Shooting expert
BrageP's Avatar
Disse er vel ikke helt nyttige, men morsomme:

Kode

cal
root@raspberrypi:~# cal
January 2013
Su Mo Tu We Th Fr Sa
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31

root@raspberrypi:~#
Vis hele sitatet...
Vil du finne ut hva slags ukedag Martin Luther slo opp tesene på kirkedøra - den 31. oktober 1517:

Kode

cal 10 1517
Aha, det var på en lørdag.


Og en morsom en til slutt:

Kode

who mom hates
root@raspberrypi:~# who mom hates
root pts/0 2013-01-18 16:19 (debian)
Vis hele sitatet...


Mine mest brukte kommandoer er nok:

df -h <--- sjekker diskplass
free -m <--- sjekker minnebruk
mkdir <--- oppretter katalog
rm -r <--- sletter katalog
top <--- sjekker prosesser, minne og cpu
killall <--- knerter prosess som har hengt seg