User Tools

Site Tools


Linux Commands

Services / systemd

List enabled Services

systemctl list-unit-files --state=enabled

List running Services

systemctl list-units --type=service

User Management

Create a User

useradd <username> -m -s /bin/bash
passwd <username>

Delete a User

User accounts can be deleted with the userdel command. The -r option specifies that the user’s home directory and mail spool should also be deleted.

userdel -r <username>

See also:

Add a User to a Group

gpasswd -a <username> <group>

Change User

su - <user_name>


Get Info about GPU

lshw -C display

Get Infos about CPU

cat /proc/cpuinfo

Get Infos about CPU Temperature and Fans

You need the package called lm-sensors. The command is sensors. Also see:

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>:


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


Reboot with Timer (5 Minutes) and Message

shutdown -r +5 "<message>"
linux_commands.txt · Last modified: 2020/09/14 18:27 by pmay