MALIKA KAROUM

MALIKA KAROUM

  • Home
  • Inleiding
  • Unite Arab Emirates
  • Blog
  • video’s
  • Promotion
    • Worth for free now
    • Work from Home 2023
    • Gadgets
    • All about Windows
    • about Whatsapp
    • Whats the
    • About websites
    • New Ways
    • New Way of Watching
    • Virtual
    • Website
    • All about Video
    • How to Use
    • YouTube Info
    • All about Twitter
    • The Best of
    • About Apps
    • Google News
    • For Free
    • About This
    • Need More
    • Why should you
    • Iphone news
    • Interesting News
    • About Amazone
    • Some tips
    • About Netflix
    • All about Music
    • About Facebook
  • Marketing
    • Malika Karoum Strategie Modules
    • Malika Karoum Online Marketing
    • Malika Karoum Business Service
    • Malika Karoum Marketing Platform
    • Online business marketing
  • Luxury
    • The Indulgence Business site
    • The Luxury Web site
    • The Ultimate Indulgence
    • The Indulgence Site
    • The Ultimate Luxury Information site
    • Online luxury
  • Malika Karoum
    • Malika Karoum LinkedIn
    • Malika Karoum Facebook
    • Malika Karoum Instagram
    • Malika Karoum Business News
    • Adverteren grote fraude
    • Menu POS
    • Malika Karoum Evenementen
  • Security
  • Malika Karoum link
  • Home
  • Malika Karoum Global News
  • How to Display Process Information on a Linux System With the ps Command
March 29, 2023

How to Display Process Information on a Linux System With the ps Command

How to Display Process Information on a Linux System With the ps Command

by Malika Karoum / Monday, 22 March 2021 / Published in Malika Karoum Global News

In multiprocessing operating systems like Linux, processes form an integral part of the system workflow. Sometimes, users need to list the running processes on a system for monitoring purposes. In such situations, Linux command-line utilities can be helpful.

The ps command is one such tool that displays information related to processes on a Linux system. Let’s look at the ps command and some important examples of usage.

What Is the ps Command?

A process is the basic component of computing in a Linux machine. Every program you open executes one or more processes that are responsible for the working of the computer. From an advanced video editing application to a simple utility like the mv command, everything is comprised of processes.

The ps command, which is an acronym for Process Status, comes in handy when you want to get a list of all the processes running on your system. This command also provides additional information associated with these processes to the user.

Related: What is a Process in Linux?

How to Use the ps Command in Linux

The basic syntax of the ps command is:

ps [options]

Running the ps command without any arguments produces the following output:

ps

The following information is provided in the aforementioned output.

  • PID: The process ID of the highlighted process
  • TTY: Displays the name of the terminal that you’re using
  • TIME: The time allotted to the process by the CPU
  • CMD: The command that is responsible for launching the process

List All Processes

To get a list of all the processes on a Linux system, use the -A or -e flag with the default ps command.

ps -A
ps -e

View Processes Associated With the Terminal

The -T flag will display the list of all the processes related to the terminal.

ps -T

You will see an output that looks something like this.

Display Processes Not Associated With the Terminal

The -a flag will list down processes that aren’t associated with the current terminal.

ps -a

The screen will display an output.

Negate the Specified Options

You can also use the -N or the –deselect flag with the ps command to invert the working of a specific argument.

For example, the -T option displays the processes associated with the terminal. Adding the -N or the –deselect flag with the command will show the processes that are not associated with the current terminal.

ps -T -N
ps -T --deselect

Display Custom Columns in the Output

The default ps command displays the following columns: PID, TTY, TIME, and CMD. However, you can tweak these columns and show other details instead.

The -eo flag allows you to specify columns that you want to get in the output.

ps -eo pid, uname, pcpu, stime, pri, f

Rename Columns in the Output

You can also rename the column labels in the output. The -o flag will allow you to do this.

ps -e -o pid=Process_ID, uid=User_ID, com=COMMAND

List Down Currently Running Processes

To get a list of the processes that are currently running on your system, pass the -ax flag with the ps command. The -a stands for All.

ps -ax

Display Processes in BSD Format

The Linux format of passing arguments with the command utilizes the – (hyphen) character. On the other hand, the BSD format doesn’t include any special characters with the argument flags.

For example, ps -A (Linux format) will display a list of all processes. The BSD equivalent of this command is:

ps au

where a stands for All and u denotes users.

Full Format Listing of Processes

To get detailed information related to the processes, pass the -ef or -eF option with the command.

ps -ef
ps -eF

The above-mentioned output contains the following information about processes.

  • UID: The user ID of the user responsible for the process
  • PID: The process ID of the entry
  • PPID: The process ID of the parent process
  • C: CPU usage and scheduling information related to the process
  • STIME: Time when the process was started
  • TTY: The name of the terminal that you’re currently using
  • TIME: Amount of CPU time used by the process
  • CMD: The command which executed the process

Get a List of Processes Related to a User

The -u option displays a list of all the processes started by a specific user.

ps -u username

Show Processes Related to the Root User

To display all processes that are run by the root user, pass root with the -U and -u flag.

ps -U root -u root

Get a Process PID

To get the Process ID of a particular process, use the -C flag with the command.

ps -C process-name

Replace process-name with the name of the process. The output will display the ID of the process.

ps -C bash

List Down the Threads of a Specific Process

You might know that a process can contain multiple threads, each responsible for a specific task. To display a list of the threads of a process, use the -L flag with the ps command. Note that you will have to pass the Process ID of the process along with the command.

ps -L pid

For example

ps -L 1250

Display Process Associated With a Particular Group

Getting a list of processes related to a certain group is easy as well. Use the -fG flag with the default command.

ps -fG groupname

Alternatively, you can also pass the group ID instead of the g-roup name.

ps -fG groupid

For example

ps -fG sudoers
ps -fg 1000

Display Processes in a Tree Format

To get a hierarchical tree representation of the running processes in Linux:

ps -f --forest -C bash

The aforementioned command will display all the processes related to bash.

Monitoring Running Processes in Linux

Knowing which processes are running on your computer can prove to be helpful if you’re short on resources. You can easily kill unresponsive Linux processes that you don’t want on your system using the command-line.

For those who have low-end computers and want an operating system that offers smooth performance, many lightweight Linux distributions are available.

MUO – Feed

  • Tweet
Tagged under: Command, Display, Information, Linux, Process, System

About Malika Karoum

What you can read next

How to Force Cortana to Use Chrome & Google in Windows 10
Why We Never Had “The Year of the Linux Desktop”
Cheat Sheet: The Vim Linux Command Line Editor Cheat Sheet

Malika Karoum Blog 2023

  • How to Delete the Last 15 Minutes of Your Google Search History

    There’s a quick way for you to clear your...
  • Lenovo Wants You to Know Its Yoga Pad Pro Can Be Used as a Portable Switch Display

    Sometimes, when playing with your Nintendo Swit...
  • The 5 Best Apps for Buying and Selling Pre-Owned Books

    We’ve all been at the point where we have...
  • Humble’s Recent "Heal Covid-19" Bundle Raised 1.2 Million for Charity

    To help raise money for COVID-19 relief in Indi...
  • Nintendo Partners With PlayVS to Make Its Games Recognized High School Varsity Athletics

    It’s odd—Nintendo gets a lot of flak for ...
  • The Pros and Cons of Playing Video Games on an Emulator

    If you’re a fan of playing retro video ga...
  • 5 Curators to Find the Best Articles Worth Reading on the Internet

    When anyone and everyone is a publisher, it isn...
  • Apple Could Unveil iPads With OLED Screens in 2023

    Apple only just switched from LCD to mini-LED d...
  • What Is Signal and How Does It Work?

    The chances are that you use at least one of th...
  • Samsung’s Upcoming Flagship Exynos Chipset Will Feature AMD’s RDNA2 GPU

    AMD confirmed its partnership with Samsung at C...
  • Atari Finally Reveals the Launch Date for the New Atari VCS Console

    At last, after what seems like an age (it pract...
  • Twitter Starts Testing Full-Screen Ads in Fleets

    Twitter has announced that it will be adding fu...
  • When Is Facebook Messenger Going to Offer End-to-End Encryption?

    Facebook Messenger is easy to use and has great...
  • Get Paid to Play Apps: How They Work and What You Risk

    You’ve probably seen advertisements for a...
  • When Will PS5 Production Ensure Supply Meets Demand?

    Despite the PS5’s launch taking place in ...
  • How to Manage Processes on Ubuntu Using System Monitor

    Linux, like most modern operating systems, is v...
  • How to Get Verified on Twitter and Finally Get That Blue Check Mark

    Twitter, like most social media platforms, offe...
  • 10 Street Photography Tips That Will Make You a Better Photographer

    Street photography is enjoyed by many enthusias...
  • Huawei Freebuds 4i Review: Quality ANC Earbuds for $100

    Huawei Freebuds 4i 8.00 / 10 Read Reviews Read ...
  • What Is Extended Reality (XR) and How Does It Work?

    We’re living in a digital age where the virtual...

MALIKA KAROUM ONLINE MARKETING PLATFORM

Office:
RME HOLDINGS SARL – DUBAI BRANCH

BUSINESS CENTER

Parcel ID: 345-835

Area: Bur Dubai

Sub Area: Burj Khalifa

UNITED ARAB EMIRATES

 

 

 

Malika Karoum Concept

Malika Karoum Projects

  • GET SOCIAL

© 2014 Malika Karoum -United Arab Emirate Dubai- All Rights Reserved

TOP