- Update editor alternative
- Run docker with sudo without password (for docker group)
- User / group management
- Devices
- Ports
sudo update-alternatives --config editorsudo visudoAdd the following line in
%docker ALL=(ALL) NOPASSWD: /usr/bin/dockerd
This command creates a user named harry
sudo useradd -m harryOptional
-msummons the command to create a home directory for the user and allows login
This command creates a group named porter
sudo groupadd porterThis command adds the user harry to the group porter
sudo usermod -aG porter harrycat /etc/groupUse grep for filtering
lsblk -fgrep -qs '/media/wd' /proc/mounts && echo yes || echo no
-qsflag means suppress and silent, good to be used inifstatement
sudo lsof -i -P -n | grep LISTEN
# or
sudo netstat -tulpn | grep LISTEN
# or
sudo ss -tulpn | grep LISTEN
# or
sudo lsof -i:22 # see a specific port such as 22