Skip to content

Linux commands ​

Quick reference for common terminal tasks. Check a command's options with man <command> before using it on important files.

TaskCommand
Show current directorypwd
List files, including hidden filesls -la
Change directorycd /path/to/directory
Create a directorymkdir -p directory
Copy a filecp source destination
Move or rename a filemv source destination
Find files by namefind . -name '*.log'
Search text in filesgrep -R 'text' directory
Show disk spacedf -h
Show directory sizedu -sh directory
Show running processesps aux
Follow a log filetail -f application.log

Use sudo only when a command needs administrator privileges. Review paths carefully before using rm or changing permissions.