wget -4 -c -O /dev/null http://speedtest.belwue.net/1G
curl ifconfig.me
Nutze speedometer -r <network interface> -t <network interface>. Speedometer muss vorher installiert werden.
mount -t nfs -o proto=tcp,port=2049 <IP Synology>:<Pfad auf dem NAS> <Mount Point>
Z.b so:
mount -t nfs -o proto=tcp,port=2049 192.168.1.125:/volume1/raspi_backup /media/raspi_backup/
python3 -m http.server <8000 *Port ist Optional*>
Öffne einen Browser and tipe http://<your ip address>:8000
Führe einen der folgenden Befehle unter Linux aus, um die offenen Ports zu sehen:
sudo lsof -i -P -n | grep LISTEN
sudo netstat -tulpn | grep LISTEN
sudo ss -tulpn | grep LISTEN
sudo lsof -i:22 ## see a specific port such as 22 ##
sudo nmap -sTU -O IP-address-Here
sudo -u \<Benutzer> \<Programm>
z.B so
sudo -u www-data nano /Pfad/zur/datei.py
Zum Sperren
passwd -l <username>
Zum Entsperren
passwd -u <username>
sudo du -s / * | sort -rn | head -n 10
Verwenden ls -lSh um alle Dateien nach Größe aufzulisten oder ls -lShr in umgekehrter Reihenfolge aufzulisten
Wechsel in das Verzeichnis mit den Dateien
cd <VerzeichnisMitDenMeistenDaten>
sudo du -s * | sort -rn | head -n 10
Unter root
find /home/synology/ -type d -exec du -sh {} \; 2>/dev/null | sort -brh | head -n 40
find ./ -type f -exec md5 {} \; | awk -F '=' '{print $2 "\t" $1}' | sort | uniq -d -f 1 -s 33
Check welche Pakete zur Verfügung stehen
apt-cache policy <Paketname>
Paket installieren
apt install <Paketname>=<Version>
Verwenden den Befehl ps mit der Option 'etime', um die genaue verstrichene Zeit zu ermitteln.
ps -p <pid> -o etime
Bestimme das Terminal zsh oder bash
echo $SHELL oder echo $0 oder ps -p $$
Erstelle .bash_profile oder .zshrc file jenachdem welche shell installiert ist
vim ~/.zshrc
When the .bash_profile or .zshrc file is created you are ready to enter your alias commands. So here I am using the alias ‘l’ to alias the command ‘ls -lah’
Wenn die .bash_profile- oder .zshrc-Datei erstellt ist, kann man die Alias-Befehle eingeben, syntax = alias <Alias>='<Befehl>'. Hier verwende ich also den Alias 'l' für den Befehl 'ls -lah'.
alias l='ls -lah'
Aktualisiere die Shell-Umgebung
source ~/.bash_profile
source ~/.zshrc
Installier GPIOZERO auf dem PI
apt install python3-gpiozero
Im Terminal
pinout
Output:
,--------------------------------.
| oooooooooooooooooooo J8 +====
| 1ooooooooooooooooooo | USB
| +====
| Pi Model 3B V1.2 |
| +----+ +====
| |D| |SoC | | USB
| |S| | | +====
| |I| +----+ |
| |C| +======
| |S| | Net
| pwr |HDMI| |I||A| +======
`\-| |--------| |----|V|-------'
Revision : a02082
SoC : BCM2837
RAM : 1024Mb
Storage : MicroSD
USB ports : 4 (excluding power)
Ethernet ports : 1
Wi-fi : True
Bluetooth : True
Camera ports (CSI) : 1
Display ports (DSI): 1
J8:
3V3 (1) (2) 5V
GPIO2 (3) (4) 5V
GPIO3 (5) (6) GND
GPIO4 (7) (8) GPIO14
GND (9) (10) GPIO15
GPIO17 (11) (12) GPIO18
GPIO27 (13) (14) GND
GPIO22 (15) (16) GPIO23
3V3 (17) (18) GPIO24
GPIO10 (19) (20) GND
GPIO9 (21) (22) GPIO25
GPIO11 (23) (24) GPIO8
GND (25) (26) GPIO7
GPIO0 (27) (28) GPIO1
GPIO5 (29) (30) GND
GPIO6 (31) (32) GPIO12
GPIO13 (33) (34) GND
GPIO19 (35) (36) GPIO16
GPIO26 (37) (38) GPIO20
GND (39) (40) GPIO21
For further information, please refer to https://pinout.xyz/
Requires=time-sync.target
Requires=systemd-time-wait-sync.service
After=network.target
After=systemd-time-wait-sync-service
rsync -avz --progress --exclude-from='/Volumes/pictures/files_exluded.txt' --delete /Volumes/pictures/ /Volumes/foto_backup/
rsync -aAXv --delete --exclude-from=/home/oliver/rync_exlude.txt / /media/backup
File mit Inhalt
/dev/*, /proc/*, /sys/*, /tmp/*, /run/*, /mnt/*, /media/*, /cdrom/*, /lost+found