Useful commands

Revision as of 17:21, 16 May 2026 by Teeth (talk | contribs) (a few commands 2 get u started)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

computers have so many commands! it is hard to remember them all. hopefully this page can help for the next time you are staring nervously at the shell.

by category

media

command example description
magick magick in.png out.jpg convert image files
ffmpeg ffmpeg -i in.mov out.mp4 convert video and audio files
yt-dlp yt-dlp https://youtu.be/INa_SYywZis download videos & audio from YouTube and other platforms

text

command example description
cat cat in.txt print out a file
less less in.txt page through a file
head head -n 5 in.txt view the beginning of a file
tail tail -n 5 in.txt view the end of a file
grep grep "search" in.txt search a file for some text
sed sed -i 's/old/new/' in.txt find and replace text in a file
nano nano out.txt a pretty simple text editor, like the "Notepad" of linux
emacs emacs out.txt a really powerful text editor that's a bit harder to use
vim vim out.txt an unhinged text editor that some people have opinions about

web

command example description
wget wget http://a.horse/disc.iso download a file
curl curl http://ip.me send a HTTP request to a server
caddy caddy run host a web server
php8.4 php8.4 page.php run a php script and check it for errors

network

command example description
dig dig pronounmail.com lookup DNS records for a domain
nslookup nslookup pronounmail.com lookup DNS name server for a domain
ping ping pronounmail.com check if two computers can see each other
lsof lsof -i -P -n list open ports on the current machine

services

command example description
systemctl systemctl status my_unit start/stop/check statuses of services
journalctl journalctl -xeu my_unit check logs for a service

help

command example description
tldr tldr git pull command usage examples
man man git command usage details