cat - View Files in Linux
From the Linux Commands cheat sheet · File Viewing & Editing · verified Nov 2026
cat - View Files
Display file contents, concatenate files, or create new files
bash
# Display file contents
cat file.txt
# Display multiple files
cat file1.txt file2.txt
# Display with line numbers
cat -n file.txt
# Create file with content
cat > newfile.txt
# Type content, then press Ctrl+D to save✅ Best for viewing small files
💡 -n adds line numbers to output
🔍 Use less or more for large files
filesviewdisplay
Continue with Linux Commands
Save the full cheat sheet or work through every related task.