Services Work Learn About Contact
0/6
Lesson 4 of 6

Reading & Editing Files

View file contents without opening an editor. cat prints the whole file. less lets you scroll. head and tail show the beginning or end. For editing, nano is a simple terminal-based editor.

TERMINAL
# Print entire file
 cat config.txt

# Scroll through a file
less long-file.txt

# Show first 10 lines
head config.txt

# Show last 10 lines
tail config.txt

# Edit with nano
nano config.txt
🧠

Quick Quiz

Answer correctly to unlock the next lesson.

Support the mission

This learning platform is 100% free: no ads, no tracking, no paywalls. If it helped you learn something useful, you can support future lessons or donate to Doctors Without Borders, which provides emergency medical care in crisis zones worldwide.

🎉

You completed Terminal!

You finished all 6 lessons and quizzes. You now know the basics of Terminal.