Table of Contents
You can do useful work in a Linux terminal without memorizing hundreds of commands. These five skills cover locating files, editing text, reading long output, running dependent commands, and investigating a stuck application. The examples assume a typical Linux system with GNU tools and a Bash-compatible shell.
1. Find files with find

find searches the directory you specify and its subdirectories. Start with a folder you own rather than searching the entire system.
find ~/Documents -type f -name '*.pdf'
find ~/Downloads -type f -size +100M
find ~/Documents -type f -mtime -7- The first command finds regular files whose names end in lowercase
.pdf. Use-inameinstead of-namefor a case-insensitive match. - The second finds files larger than 100 MiB. In GNU find,
Mmeans mebibytes, not decimal megabytes. - The third finds files modified within the last seven 24-hour periods. It is based on modification time, not the date a file was created.
Quote wildcard patterns so the shell does not expand them before find receives them. Replace folder paths if your system uses different names. These examples only list matches; do not add deletion actions while learning. For more search options, see Linux file-search tools and the installed manual, man find.
2. Edit a text file with nano

Practice on a new file before editing configuration:
nano ~/terminal-notes.txtType some text, press Ctrl+O, confirm the filename with Enter, then press Ctrl+X to exit. The shortcuts shown along the bottom are a useful reminder; a caret such as ^O means Ctrl+O.
You can also open nano ~/.bashrc to edit your personal Bash configuration. Make a backup first and change one thing at a time. Nano makes editing convenient, but it cannot prevent a wrong setting from breaking a shell or application. TipsMake’s plain-text editing guide includes basic Nano usage, and the official Nano shortcut sheet documents its controls.
3. Read long output with less

less lets you inspect text without loading it into an editor. Try it on the file you just created:
less ~/terminal-notes.txt- Use the arrow keys or Page Up/Page Down to move.
- Press /, enter a search term, and press Enter.
- Press n for the next match.
- Press q to return to the shell.
A pipe sends another command’s output to less, for example dmesg | less. Access to kernel logs may be restricted. /var/log/syslog does not exist on every distribution; systems using systemd often provide logs through journalctl, which already uses a pager by default. Diagnose missing files or permission errors before assuming the command is broken.
4. Run dependent steps with && and ||

These are shell operators rather than standalone commands. && runs the next command only if the previous one succeeds; || runs the next command if the previous one fails.
mkdir terminal-practice && cd terminal-practice
make || echo 'Build failed'The first example changes directory only after creating it successfully. The second displays a message when make returns a failure status; run it only in an appropriate build directory with make installed. The Bash manual explains the exit-status rules. Read each step before joining commands, especially when they install software or alter files.
5. Inspect processes before stopping one

ps aux displays a snapshot of running processes, including their owners and process IDs (PIDs). To narrow the output, replace the example name with the application you are investigating:
ps aux | grep 'processname'The search can also match grep itself or similarly named processes. Confirm the application, owner, and PID before taking action. Try closing the application normally first.
kill PID, with PID replaced by the verified numeric process ID, sends SIGTERM by default. It gives the process an opportunity to clean up, and termination may not be immediate. If it remains stuck, kill -9 PID sends SIGKILL and prevents that cleanup, potentially losing unsaved work. Reserve it for a confirmed unresponsive process.
The kill manual describes the signals. For live resource monitoring, use top or, if installed, htop. Use man or a command’s help option when you need to confirm syntax before a consequential action.
Reader Comments 0
Sign in with email or Google to join the discussion.