Unique sorted values linux
Count occurrences of each unique line
sort file.txt | uniq -c | sort -rn
more linux
all 133 commands →
Show users logged in
who -H && w
Last logins
last -n 20 | head -25
Failed login attempts
journalctl -u ssh --since '24h ago' | grep 'Failed password' | awk '{print $(NF-3)}' | sort | uniq -c | sort -rn | head -10
Check sudo access
sudo -l -U <username>
Add user to group
usermod -aG docker,sudo alice