Skip to content

Latest commit

 

History

History
23 lines (23 loc) · 1.11 KB

README.md

File metadata and controls

23 lines (23 loc) · 1.11 KB

CLI Cheat Sheet

Debian Setup

Create new user: adduser <username>
Grant sudo: usermod -aG sudo <username>
SetUp firewall: sudo apt update && sudo apt install ufw
Enable Services: sudo ufw allow OpenSSH && sudo ufw allow http && sudo ufw enable

Linux

Find a specific process: ps ax | grep <process-name>
Check ports usage: sudo lsof -i -P -n | grep LISTEN
Give user recursive permission for all subdirs sudo chmod -R o+rwx
Remove those permissions again sudo chmod -R o-rwx
Restart network service: sudo /etc/init.d/networking restart

Git

Add file changes: git add --all
Commit changes: git commit -m "<description>"
Push changes: git push <remote-repo(usually origin)> <branch(usually master)>

WSL 2

Path on windows explorer: \\wsl$\

Docker

List all running docker containers: docker ps for all containers: docker ps -a
Execute a command in a running container: docker exec -it <container name> <command>
Copy files: docker cp <container name>:<src path> <dest path>
Remove all unused docker objects: docker system prune