Linux - erikpa1/MyExperience GitHub Wiki

Commands

sudo su - enter the root mode

pwd - print working directory

ls -la - list folders with permisions

chmod +x new.txt

User management

adduser <username>

cat /etc/passwd

cat /etc/shadow

Formatting

-n - omits the trailing newline added at the end of the output

echo -n "My text" | base64

Networking

Checking running services on port

sudo ss -tlnp | grep :80

Workign with images

# File size
ls -lh image.png


# Dimensions (width x height) — needs ImageMagick
sudo apt install graphicsmagick-imagemagick-compat
identify image.png

Important files

auth.log

/var/logs/auth.log - contains all logs from login attempts into SSH.

⚠️ **GitHub.com Fallback** ⚠️