Skip to content

fonzane/cli_cheat_sheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 

Repository files navigation

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

About

Collection of cli-commands I find useful

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published