I’ve created a cheat sheet for Linux commands that I don’t know, for when I need them. Apart from adding Linux commands I have added some Basic Python Comands.
Linux Commands
Cheat Sheet
Linux Basics
14 commands
| pwd | →Show the current folder path |
| ls | →List files and folders in directory |
| cd <folder> | →Enter into a folder |
| cd .. | →Go up one folder level |
| mkdir <name> | →Create a new folder |
| rm <file> | →Delete a file |
| rmdir <folder> | →Delete an empty folder |
| cp <src> <dest> | →Copy files or folders |
| mv <src> <dest> | →Move or rename files |
| cat <file> | →Show the content of a file |
| touch <file> | →Create an empty file |
| clear | →Clean the terminal screen |
| sudo <command> | →Run a command with administrator permissions |
| man <command> | →Show the manual for a command |
| ping <web.com> | →Check connection with a server |
| top / htop | →Show active system processes |
Git Version Control
8 commands
| git init | →Start a new repository |
| git status | →Show the status of changes |
| git add . | →Stage all files for commit |
| git commit -m “msg” | →Save changes with a descriptive message |
| git log | →Display the history of commits |
| git push | →Send changes to remote repository |
| git pull | →Download changes from remote repository |
| git clone <url> | →Download a project from GitHub |
Python Basics
11 commands
| print(“text”) | →Show text on screen |
| variable = value | →Declare a variable |
| input(“message”) | →Request input from the user |
| if condition: | →Begin a conditional block |
| else: | →Alternative branch of a condition |
| for i in range(n): | →Loop a given number of times |
| while condition: | →Loop while the condition is met |
| def function(): | →Declare a reusable function |
| python file.py | →Run a Python file from terminal |
| exit() | →Exit the Python interpreter |
Terminal Extras
4 commands
| code . | →Open current folder in VS Code |
| exit | →Exit from the terminal session |
| clear | →Clean the terminal screen |
| history | →Show command history |

Deixa un comentari