Beginner Linux · 30 min
Processes and disk space
Inspect running programs and understand where storage is being used.
Learn the commands
Commands to know
Everything you need for this lesson is here. Use the full guide only when you want more options and examples.
Show processes running from your current shell.
- Syntax
- ps [options]
- Example
- ps aux
Tip: ps aux gives a broad snapshot; use it before deciding what to stop.
Watch running processes and their resource use live.
- Syntax
- top
- Example
- top
Tip: Press q to leave the live view.
Send a signal to a process by its process ID.
- Syntax
- kill <PID>
- Example
- kill 1234
Tip: Confirm the process with ps first; stopping the wrong process can lose work.
Show free and used disk space by filesystem.
- Syntax
- df [-h]
- Example
- df -h
Tip: Use -h for sizes that are easier to read.
Estimate how much disk space files and folders use.
- Syntax
- du [-sh] <path>
- Example
- du -sh .
Tip: Use -s for one total and -h for readable sizes.
Try it
Practice exercise
Find a process and inspect disk usage for the current folder.
Open playgroundYour progress
Mark this lesson when you feel ready to move on.
Your progress is saved on this device. Log in to back it up and continue anywhere.