The commands below cover 95% of daily Linux use – navigation, files, permissions, processes, networking, and package management. Bookmark this page, or print it (Ctrl+P / Cmd+P) to keep a copy on your desk.
🖥️ Navigation & files
pwdPrint current directorylsList filesls -laList all files with details & hidden filescd dirChange to directorycd ~Go to home directorycd ..Go up one levelmkdir dirCreate directoryrm fileDelete file (careful – no undo)rm -r dirDelete directory recursivelycp a bCopy a → bmv a bMove / rename a → btouch fileCreate empty filecat filePrint file contentsless fileView file (scroll, q to quit)head / tail fileFirst / last 10 linestail -f fileWatch file grow (logs)grep pattern fileSearch lines matching patternfind . -name "*.txt"Find files by name🔐 Permissions & ownership
chmod 755 fileSet permissions (rwxr-xr-x)chmod +x fileMake executablechown user fileChange ownerchown -R user dirChange owner recursivelyls -lShow permissionssudo commandRun as administrator📦 Package management (apt – Debian/Ubuntu)
sudo apt updateRefresh package listsudo apt upgradeUpgrade installed packagessudo apt install pkgInstall a packagesudo apt remove pkgRemove a packageapt search termSearch available packagesdpkg -lList installed packages⚙️ Processes & system
ps auxList running processestop / htopLive system monitorkill PIDEnd a processkill -9 PIDForce-end a processsystemctl status svcService statussystemctl start/stop svcStart / stop a servicesystemctl enable svcStart service on bootdf -hDisk usagedu -sh dirDirectory sizefree -hMemory usageuname -aKernel info🌐 Networking
ping hostCheck connectivityip addrShow IP addressescurl URLFetch a URLwget URLDownload a filessh user@hostConnect via SSHscp f user@h:/pathCopy file over SSHnetstat -tulpnShow open portsdig domainDNS lookup🧰 Handy shortcuts & tricks
TabAuto-complete↑ / ↓Command historyCtrl + CCancel current commandCtrl + DExit shell / EOFCtrl + RSearch historycommand | grep xPipe output into searchcommand > fileSave output to file!!Repeat last commandman commandManual / help📬 Want more like this?
Join the VelsTech Weekly – five useful things a week: one AI find, one tool, one hardware insight, one Linux trick, and a genuinely good deal. No spam, unsubscribe anytime.