Inhaltsverzeichnis

TERMINAL HELPCUTS

CURL

curl -O http://www.gutenberg.org/cache/epub/345/pg345.txt

ls *.txt

Top

top
ps -ef
pstree -p

show all processes and there ID to kill one just type

q

to quit «Top»

kill ID

my IP

hostname -I

SSH PI

ssh pi@192.168.0.109

and password (default: raspberry)

DISPLAY ROTATE

sudo nano /boot/config.txt

end of file add

display_rotate=0

0 is the normal configuration. 1 is 90 degrees. 2 is 180 degress. 3 is 270 degrees

KIOSK

sudo apt-get install chromium-browser
sudo apt-get install unclutter
sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart
# Bildschirmschoner deaktivieren
#@xscreensaver -no-splash  
@xset s off
@xset -dpms
@xset s noblank

# lädt Chromium im Vollbild bei einem Neustart
@chromium-browser --incognito --kiosk https://ibulla.com

start script

@/home/pi/script_start.sh

chmod file

chmod 755 file.sh

CREATE RANDOM PSW

openssl rand -base64 32

CREATE KEY PAIR

ssh-keygen -t rsa -b 4096

shortcut

nano ~/.ssh/config
Host shortcut
User root
Port 222
HostName 192.168.2.30

Host shortcut1
User root
Port 222
HostName 192.168.2.30
IdentityFile ~/.ssh/id_rsa
ssh shortcut

Copy machine to machine

scp /Users/ibulla/Desktop/servo.py ibulla@192.168.0.111:/home/ibulla/Desktop
scp /full/path/from/A/file.txt  pi@192.168.0.0:/to/path/B/file.txt
scp pi@192.168.0.0:/from/path/A/file.txt /full/path/to/B/file.txt

osx hints

show/hide folder path (YES NO)

defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES

show/hide hidden folders (TRUE FALSE)

defaults write com.apple.finder AppleShowAllFiles TRUE

restart finder

killall Finder

BASH

Unix-Befehle

sed (https://wiki.ubuntuusers.de/sed/), sed (von stream editor) ist ein nicht-interaktiver Texteditor für die Verwendung auf der Kommandozeile oder in Skripten. sed zählt zu den „Urgesteinen“ in der Unix- / Linux-Welt und ist quasi in jeder Linux-Installation (auch Minimalinstallationen) enthalten.

sed s/DIESE/MIT DEM ERSETZEN/g inDieserDatei
find / -type d -name 'httpdocs'

use : man find for more options

VIM (!NANO)

NGINX

service xxx restart

/etc/init.d/nginx restart