Skip to main content
CodeSpeedTest
Languages
Start TypingJump into a test — pick any languageAdaptive TrainingUnlock chars as you master them — home row to !@#$%Practice DrillsFocused sessions targeting weak spotsDaily ChallengesNew coding challenges every dayRace ModeCompete against others in real timeAI OpponentRace against an AI at your WPM level
LeaderboardGlobal rankings for every languageCertificatesEarn verifiable Bronze / Silver / Gold certsActivityDaily streaks & historical analyticsProfileYour stats, badges & achievements
Browse Languages500+ languages with real code examplesBlogTips, guides & deep divesFAQCommon questions answeredGetting StartedNew to CodeSpeedTest?AboutOur story & mission
Pricing
Start Typing
Tools/Linux Commands

Linux Commands — Essential CLI Reference

Every essential Linux command organized by category with common flags and one-line descriptions. Built for developers who want CLI fluency.

Navigation & File System

CommandCommon flagsDescription
ls-la | -lh | --colorList directory contents
ls -laLong format with hidden files
cd~ | - | ..Change directory
pwdPrint working directory (current path)
mkdir-p path/to/dirCreate directory (and parents with -p)
rmdirRemove empty directory
rm-rf dir | -i fileRemove files or directories
cp-r src/ dst/ | -pCopy files or directories
mvsrc dstMove or rename files
touchfile.txtCreate empty file or update timestamp
ln-s target linkCreate symbolic or hard link
tree-L 2Display directory tree structure

File Operations & Text

CommandCommon flagsDescription
catfile.txt | -nPrint file contents to stdout
lessfile.logPage through file interactively
head-n 20 filePrint first N lines of a file
tail-n 50 -f file.logPrint last N lines; -f follows in real time
grep-r -n -i --color pattern .Search for pattern in files
grep -rn"TODO" src/Recursive numbered search
find. -name '*.ts' -type fFind files matching criteria
find . -mtime-7Find files modified in last 7 days
sed's/old/new/g' fileStream editor — substitute text
awk'{print $1}' fileText processing and column extraction
sort-r -n -k2Sort lines of a file
uniq-c | -dRemove duplicate lines (often piped from sort)
wc-l -w -c fileCount lines, words, and characters
diff-u file1 file2Show differences between two files
chmod+x script.sh | 644 fileChange file permissions
chownuser:group fileChange file owner and group

Process Management

CommandCommon flagsDescription
psaux | -efList running processes
top-u usernameInteractive process monitor
htopEnhanced interactive process monitor
kill-9 PID | -SIGTERM PIDSend signal to a process
killallnodeKill all processes by name
pkill-f patternKill processes matching a pattern
bg%1Resume a stopped job in the background
fg%1Bring a background job to the foreground
jobs-lList background jobs in current shell
nohupcmd &Run command immune to hangups
lsof-i :3000List open files / processes on a port
strace-p PIDTrace system calls of a process

Networking

CommandCommon flagsDescription
ping-c 4 google.comSend ICMP echo requests to test connectivity
curl-s -X POST -H 'Content-Type: application/json' -d '{}'Transfer data with HTTP/HTTPS
curl -Ihttps://example.comFetch HTTP headers only
wget-O file.zip https://example.com/fileDownload file from URL
sshuser@host -p 22 -i key.pemSecure shell remote login
scp-r dir/ user@host:/remote/Copy files over SSH
rsync-avz src/ user@host:dst/Sync files efficiently over SSH
netstat-tulnDisplay network connections and listening ports
ss-tulnSocket statistics (faster netstat replacement)
ip addrShow IP addresses of network interfaces
nmap-p 80,443 hostNetwork port scanner
traceroutegoogle.comTrace packet route to a host
dig+short example.com MXDNS lookup tool
nc-lvnp 8080Netcat — read/write network connections

Package Managers

CommandCommon flagsDescription
apt updateRefresh package index (Debian/Ubuntu)
apt upgrade-yUpgrade all installed packages
apt installnginx -yInstall a package
apt remove--purge nginxRemove package and config
apt-get install-y packageInstall (older apt-get syntax)
brew installnodeInstall package (macOS Homebrew)
brew updateUpdate Homebrew formulae
brew upgradenodeUpgrade a Homebrew package
yum install-y nginxInstall package (RHEL/CentOS/Fedora)
dnf install-y packageInstall package (modern Fedora/RHEL)
snap install--classic codeInstall a snap package

Compression & Archives

CommandCommon flagsDescription
tar -czfarchive.tar.gz dir/Create gzip-compressed tarball
tar -xzfarchive.tar.gzExtract gzip tarball
tar -tzfarchive.tar.gzList tarball contents without extracting
zip -rarchive.zip dir/Create zip archive
unziparchive.zip -d dest/Extract zip archive
gzipfile.txtCompress a file in-place (.gz)
gunzipfile.txt.gzDecompress a .gz file

Build CLI Muscle Memory

The fastest terminal users don't think about commands — they just type. That fluency comes from repetition. Combine this reference with CodeSpeedTest's real code snippets (shell scripts, CI configs) to build genuine CLI speed.

Practice typing these in CodeSpeedTest →

Bash scripts, Dockerfiles, and YAML configs are all available on CodeSpeedTest. Type real shell code to build terminal fluency.

Take the coding speed test →Browse all languages
CodeSpeedTest

Improve your coding speed, code accuracy, and programming syntax WPM with practice sessions across 500+ programming languages.

Quick Links

HomeAboutFeaturesGetting StartedLanguages

Resources

Pro ⚡ PricingCertifyFAQBlogContactLeaderboardRaceChallengesFree ToolsWPM CalculatorPrivacy PolicyTerms of Service

Connect

CodeSpeedTest on GitHubCodeSpeedTest on TwitterEmail CodeSpeedTest

© 2026 CodeSpeedTest. All rights reserved.