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
0
Command
Usage
1
ls
Lists the content of a directory
2
alias
Define or display aliases
3
unalias
Remove alias definitions
4
pwd
Prints the working directory
5
cd
Changes directory
6
cp
Copies files and directories
7
rm
Remove files and directories
8
mv
Moves (renames) files and directories
9
mkdir
Creates directories
10
man
Displays manual page of other commands
11
touch
Creates empty files
12
chmod
Changes file permissions
13
./
Runs an executable
14
exit
Exits the current shell session
15
sudo
Executes commands as superuser
16
shutdown
Shutdowns your machine
17
htop
Displays processes and resources information
18
unzip
Extracts compressed ZIP files
19
apt, yum, pacman
Package managers
20
echo
Displays lines of text
21
cat
Prints file contents
22
ps
Reports shell processes status
23
kill
Terminates programs
24
ping
Tests network connectivity
25
vim
Efficient text editing
26
history
Shows a list of previous commands
27
passwd
Changes user password
28
which
Returns the full binary path of a program
29
shred
Overwrites a file to hide its contents
30
less
Inspects files interactively
31
tail
Displays last lines of a file
32
head
Displays first lines of a file
33
grep
Prints lines that match patterns
34
whoami
Outputs username
35
whatis
Shows single-line descriptions
36
wc
Word count files
37
uname
Displays OS information
38
neofetch
Displays OS and hardware information
39
find
Searches for files that follow a pattern
40
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.