Terminal / CLI

icon picker
Linux commands


Följande behöver du kunna på tentan:

ls
Visar vad som finns i den mappen du är i. VIlka filer och mappar som finns
apt-get update
Uppdaterar listan för din pakethanterare. Apt håller koll på flera olika ramverk och bibliotek och hur den ska ladda ner dessa. Den behöver synka detta då och då för att du snabbt ska kunna ladda ner dessa.
apt-get install
Installerar ett verktyg till din Linuxmiljö. Tex apt-get install namnet-på-ramverket

mkdir
Skapar en mapp. Tex mkdir MAPPNAMN

cd
Gå in i en mapp. cd mappnamn eller /mapnamn/mappnamn
cp
cp FILKÄLLA_ATT_KOPIERA NAMNET_PÅ_NYA_FILEN
sudo
Sätt i början av ett kommando för att köra som super user (admin/root)

exit
Lämna sudo-state eller själva SSH-kopplingen
systemctlr restart [namn på service, tex “nginx” eller “docker”]
__ __ _ _ _ _ __ _ _____

Extra bra-att-ha:

Linux Cheat Sheet
Command
Usage
ls
Lists the content of a directory
alias
Define or display aliases
unalias
Remove alias definitions
pwd
Prints the working directory
cd
Changes directory
cp
Copies files and directories
rm
Remove files and directories
mv
Moves (renames) files and directories
mkdir
Creates directories
man
Displays manual page of other commands
touch
Creates empty files
chmod
Changes file permissions
./
Runs an executable
exit
Exits the current shell session
sudo
Executes commands as superuser
shutdown
Shutdowns your machine
htop
Displays processes and resources information
unzip
Extracts compressed ZIP files
apt, yum, pacman
Package managers
echo
Displays lines of text
cat
Prints file contents
ps
Reports shell processes status
kill
Terminates programs
ping
Tests network connectivity
vim
Efficient text editing
history
Shows a list of previous commands
passwd
Changes user password
which
Returns the full binary path of a program
shred
Overwrites a file to hide its contents
less
Inspects files interactively
tail
Displays last lines of a file
head
Displays first lines of a file
grep
Prints lines that match patterns
whoami
Outputs username
whatis
Shows single-line descriptions
wc
Word count files
uname
Displays OS information
neofetch
Displays OS and hardware information
find
Searches for files that follow a pattern
wget
Retrieves files from the internet
There are no rows in this table

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.