df -h
: Show disk space for humansscp file user@server:path/file
: Transfer file over SSHwhereis command
: Path to commandssh user@server
: Start SSH session (exit withexit
)lshw -short
: Hardware information for humansls -lah dir
: Show content of directory for humans, including hidden filescd dir
: Change directorymkdir
: Create directoryrm -rf dir
: Delete full directoryrm file
: Delete filemv file file
: Move or rename filedpkg -l
: List installed packagesdpkg -i file.deb
: Install package (ignore select dependencies with—ignore-depends=package
)dpkg --r file
: Remove package installed with dpkgifconfig
: Show network interfaceschmod +x file
: Make file executablelsmod
: Show loaded kernel moduleslsusb
: Show connected USB devicestar -xvzf file.tar.gz
: Unpack archivetar -tvf file.tar.gz
: List contents of archiveln -s file file
: Create symbolic linkufw
: Firewalladduser -m user
: Add new userusermod -aG sudo user
: Add user to sudoersapt update
: Update repository sourcesapt-cache search package
: Search packageapt install package
: Install package from repositoryapt remove package
: Remove package from repositoryps aux
: Show currently running processeskill -KILL number
: Kill processkill -s SIGNAL
: Send signal to process (i.e. USR1 to restart caddy)zip -r file.zip dir
: Create zip file from all files in the directorylspci
: Show connected PCI devicescp -avr dir dir
: Copy full directory (verbose)mv `ls | head -500` dir
: Move the first 500 files into directoryw
: Who is logged in?passwd
: Change passwordsu - user
: Temporarily switch to userdu -sh dir
: Estimate size of directoryhistory
: Show command historylsof -i
: Show open ports (if not managed with ufw)cat file
: Print contents of fileman command
: Show help for commandgit add file
: Add file to git repositorygit add -u
: Add all changed filesgit init repo
: Initialize new local repositorygit init --bare repo.git
: Initialize new remote (bare) repository (has no working tree)git remote add name
: Add remotegit remote remove name
: Remove remotegit remote -v
: List remotesgit commit -m "message"
: Commit changesgit push origin branch
: Push changes to branch on origingit pull
: Pull changes from repositorygit clone repo.git
: Clone (remote) repositorygit rm file
: Delete file from repositorygit log
: Show commit historygit remote set-url --add --push origin git://additional/repo.git
: Add second upstream to repositorynano
: Editorrestart
: Restartsystemctl ...
: Systemd controlservice ...
: Systemd controlwhich command
: Which binary does command use?mount folder
: Mount resource associated (i.e. in/etc/fstab
) with folderumount folder
: Unmount resource associated (i.e. in/etc/fstab
) with foldercurl url
: Retrieve URLwget url
: Retrieve URLsudo dpkg-reconfigure tzdata
: Set time zonenohup command&
: Run command in the background and do not terminate when session (e.g. over SSH) is closedtail -n 500 file
: Print last 500 lines of filetree
: Nice directory structurehtop
: Nice resource monitorls -1 | wc -l
: Number of files in current directorylsblk
: Show disk info, add-f
to also show IDs, file systems, and partitionssudo mkfs.ext4 /dev/sdX
: Quick format disk or partitiontimedatectl list-timezones
: List timezonessudo timedatectl set-timezone timezone
: Set timezonesensors
: Temperature (runsudo detect-sensors
first)nvidia-smi
: GPU info
Last active
March 29, 2019 19:49
-
-
Save zentralwerkstatt/26d285bd5ae4b8c1f171745a04e4fbb1 to your computer and use it in GitHub Desktop.
Unix cheat sheet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment