Linux Commands

User Management

Hardware

  • get info about GPU: lshw -C display

  • get infos about CPU: cat /proc/cpuinfo

  • get infos about CPU temperature and fans

Proxy Handling

SSH through a Proxy (to an EC2 instance in this example)

ssh -i <key_file>.pem <user>@<target_host_or_ip> -o "ProxyCommand=nc -X connect -x <proxy_ip>:<proxy_port> %h %p"

SCP through a Proxy (to an EC2 instance in this example)

scp -i ~/.ssh/<key_file>.pem -o "ProxyCommand=nc -X connect -x <proxy_ip>:<proxy_port> %h %p" <file> <user>@<target_host_or_ip>:

Special

Rotate Terminal

  • to the right: echo 1 | sudo tee /sys/class/graphics/fbcon/rotate_all

  • to the left: echo 3 | sudo tee /sys/class/graphics/fbcon/rotate_all

Administration

  • reboot with timer (5 minutes) and message: shutdown -r +5 "<message>"