Skip to main content

Shell Basics

The shell is your primary interface for interacting with Linux systems.

Essential Commands

CommandPurpose
ls -laList files with details
cd, pwdNavigate directories
cp, mv, rmCopy, move, delete
grep pattern fileSearch text
find . -name "*.log"Find files
chmod, chownPermissions

Pipes and Redirection

# Pipe output to another command
cat access.log | grep "404" | wc -l

# Redirect output to file
npm test > results.txt 2>&1