Skip to content

Linux

Users

Create new user
useradd \
    --gid 0 \
    --groups sudo,docker,users \
    --create-home \
    --shell /bin/bash \
    user
Create new user
useradd -g 0 -G sudo,docker,users -m -s /bin/bash user

Groups

List all groups
cat /etc/groups

Port Usage

List ports with TCP listeners
sudo ss -tulpn
Flags explained
Flag Description
-t Show TCP sockets
-u Show UDP sockets
-l Show only listening sockets
-p Show the process using each socket
-n Show numeric addresses (no DNS)
-w Show raw socket information (opt.)

Packages

Search installed packages
dpkg -l | grep <package-name>
List installed files
dpkg -L <package-name>

Cron

crontab guru