The everyday commands for driving a real Linux shell from a phone — navigating the filesystem, moving files, inspecting processes, managing permissions and following logs. All standard POSIX / GNU coreutils, exactly as they behave on any Linux box.
Print or save this page for offline reference.
Navigating
Command
Description
pwd
Print the current working directory.
ls -lah
List all files, long format, human-readable sizes.
cd -
Switch back to the previous directory.
tree -L 2
Show the directory tree, two levels deep.
Files & directories
Command
Description
cp -r src dst
Copy a directory recursively.
mv old new
Move or rename a file or directory.
mkdir -p a/b/c
Create nested directories, no error if they exist.
rm -rf dir
Delete a directory and its contents (irreversible).
ln -s target link
Create a symbolic link pointing at target.
Viewing & searching
Command
Description
cat file
Print a file's contents to the terminal.
less file
Page through a file (q to quit, / to search).
grep -rn "text" .
Recursively search for text, with line numbers.
find . -name '*.js'
Find files matching a name pattern.
tail -f app.log
Follow a log file live as it grows.
Permissions & ownership
Command
Description
chmod +x script.sh
Make a file executable.
chmod 644 file
Set owner read/write, others read-only.
chown user:grp f
Change a file's owner and group.
umask 022
Set default permissions for new files.
Processes & jobs
Command
Description
ps aux
List every running process with details.
top
Live view of CPU and memory usage.
kill -9 PID
Force-terminate a process by its PID.
cmd &
Run a command in the background.
jobs / fg %1
List background jobs; bring one to the foreground.
Pipes & redirection
Command
Description
cmd > out.txt
Redirect output to a file (overwrite).
cmd >> out.txt
Append output to the end of a file.
a | b
Pipe the output of a into b as input.
cmd 2>&1
Merge stderr into stdout.
cmd1 && cmd2
Run cmd2 only if cmd1 succeeds.
System & network
Command
Description
df -h
Show free disk space, human-readable.
du -sh *
Show the size of each item in the folder.
free -h
Show total, used and free memory.
curl -I url
Fetch only the HTTP response headers of a URL.
env / export X=1
List environment variables; set one for the session.