Core Linux shell commands for file navigation, permissions, and text processing, one command per card.
41 cards · basic cards · AI-written, checked twice. Edit anything.
- What command displays your current working directory?
Show answer
pwd
- How do you change to your home directory?
Show answer
cd ~ or cd
- What command changes the current directory?
Show answer
cd [path]
- How do you return to the previous directory?
Show answer
cd -
- What command lists files in the current directory?
Show answer
ls
- How do you list files with full details including permissions and size?
Show answer
ls -l
- How do you list all files including hidden ones?
Show answer
ls -a
- What command searches for files by name?
Show answer
find [path] -name [pattern]
- What command searches a file database for files?
Show answer
locate [filename]
- How do you display the entire contents of a text file?
Show answer
cat [filename]
- What command lets you scroll through a file one page at a time?
Show answer
less [filename]
- What command shows the first 10 lines of a file?
Show answer
head [filename]
- What command shows the last 10 lines of a file?
Show answer
tail [filename]
- How do you search for a text pattern within a file?
Show answer
grep [pattern] [filename]
- How do you search for a pattern across multiple files recursively?
Show answer
grep -r [pattern] [directory]