Start practicing the Linux command line
Learn how paths, directories and small commands fit together, then try them in a guided practice lab.
Start with a location
Every shell command runs from a working directory. The pwd command prints that location as an absolute path. An absolute path begins at /, while a relative path starts from your current directory.
pwdInspect before you change
Use ls to look at the entries around you. A directory organizes entries; a file contains data. On a real Linux system you can use ls -l to see more metadata, and ls -a to include hidden names.
ls -laMove deliberately
cd changes your working directory. cd .. moves to the parent directory, while cd ~ returns home. Run pwd after a move until paths feel familiar.
cd projects
pwdPractice a useful sequence
Locate a project, read its brief, then find error lines in its log. In the lab, projects contains readme.txt and app.log. You can repeat the exercise without affecting your own computer.
cat readme.txt
grep ERROR app.logMake it stick.
Try the matching guided exercise in your browser. The first 10 exercises are free; later exercises require a plan.
Practice this skill →