DevOps Terminal

Your friendly command-line cheat sheet.

$

Hier findest du die wichtigsten Terminal-Befehle, die dir im Arbeitsalltag helfen – vom Datei verschieben bis zum Ordner löschen.

Perfekt für alle, die neu sind oder sich einfach nicht mehr merken können, wie man nochmal eine Datei kopiert.

(Wir auch nicht – deshalb gibt’s diese Seite.)

Command-Line & Git Cheat Sheet

A quick reference for your daily terminal tasks. Use the search bar to filter commands instantly.

Command Description Example Usage
ls Lists the content of the current directory. ls -la
cd Changes the current directory. cd /path/to/directory
pwd Shows the absolute path of the current directory. pwd
mkdir Creates a new folder. mkdir new_folder
touch Creates a new, empty file. touch new_file.txt
cp Copies files or folders. cp file.txt /path/to/destination
mv Moves or renames files and folders. mv old.txt new.txt
rm ⚠️ Deletes a file. Be careful! rm old_file.txt
rm -r ⚠️ Deletes a folder and its content. Be very careful! rm -r old_folder
cat Shows the content of a file. cat my_file.txt
man Opens a detailed description of a command. man cd
--help Shows a short description of a command. cd --help
history Shows a history of the typed commands. history
chmod Changes the permission of a file or directory. chmod 755 file.md
chown Changes the owner or group of a file or directory. chown root file.md
Git Version Control
git status Shows the status of the local branch in relation to the remote branch. git status
git init Initializes a new Git repository in the current folder. git init
git branch Shows a list of all the local branches. git branch
git switch Switches to another branch. git switch master
git add Stages changes, preparing them for a commit. git add .
git commit Saves the staged changes to the local repository. git commit -m "Your message"
git push Uploads local commits to a remote repository (e.g., GitLab). git push origin main
git pull Fetches and merges changes from a remote repository. git pull origin main
git log Shows the commit history for the current branch. git log --oneline
git diff Shows the differences between the local and remote branch git diff
git show Opens a list of the last commits from the branch. git show
git switch Switches to a different branch (modern command). git switch new-feature
git checkout Switches branches or restores files (older, versatile command). git checkout main
git restore Discards changes in the working directory (modern command). git restore file.txt
Docker Commands
docker run Creates and starts a new container from an image. docker run -it ubuntu bash
docker inspect Displays low-level information on Docker objects. docker inspect my_container
docker version Shows the installed versions of Docker components. docker version
docker info Displays system-wide information about the Docker installation. docker info
docker system prune ⚠️ Removes all unused containers, networks, and images. docker system prune -a
docker images Lists all Docker images on the local system. docker images
docker pull Downloads an image from a registry (like Docker Hub). docker pull ubuntu:latest
docker ps Lists all running containers. docker ps -a
docker network connect Connect a container to a network. docker network connect my-network my-container
docker network create Create a network. docker network create my-network
docker network disconnect Disconnect a container from a network. docker network disconnect my-network my-container
docker network inspect Display detailed information on one or more networks. docker network inspect my-network
docker network ls List networks. docker network ls
docker network prune Remove all unused networks. docker network prune
docker network rm Remove one or more networks. docker network rm my-network