0
0
Linux CLIscripting~15 mins

ps (list processes) in Linux CLI - Mini Project: Build & Apply

Choose your learning style9 modes available
Listing and Filtering Processes with ps
📖 Scenario: You are managing a Linux system and want to see which programs are running. You will use the ps command to list processes and filter them.
🎯 Goal: Learn to use the ps command to list all running processes, filter by user, and display specific columns.
📋 What You'll Learn
Use the ps command to list processes
Filter processes by user
Display specific columns like PID and command
Use command options correctly
💡 Why This Matters
🌍 Real World
System administrators often need to check running processes to monitor system health or troubleshoot issues.
💼 Career
Knowing how to list and filter processes is a basic skill for Linux system administrators and developers working on servers.
Progress0 / 4 steps
1
List your current processes
Type the command ps to list the processes running in your current shell session.
Linux CLI
Need a hint?

The ps command without options shows processes in your current shell.

2
List all processes for your user
Type the command ps -u $USER to list all processes owned by your user account.
Linux CLI
Need a hint?

The -u option followed by your username shows all your user processes.

3
Show only PID and command columns
Use ps -u $USER -o pid,comm to list your user processes showing only the PID and command name columns.
Linux CLI
Need a hint?

The -o option lets you choose which columns to display.

4
Print the final command output
Run the command ps -u $USER -o pid,comm and print its output to see your user processes with PID and command columns.
Linux CLI
Need a hint?

The output should show a header with 'PID' and 'COMMAND' and list your processes.