• Home
  • Disclaimer
  • Contact
  • Archives
  • About
  • Subscribe
  • Support
  • Advertise

Kernel Talks

Unix, Linux, & Cloud!

  • How-to guides
    • Howto
    • Disk management
    • Configurations
    • Troubleshooting
  • OS
    • HPUX
    • Linux
  • Miscellaneous
    • Software & Tools
    • Cloud Services
    • System services
    • Virtualization
  • Certification Preparations
    • AWS Certified Solutions Architect – Associate
    • AWS Certified Solutions Architect – Professional
    • AWS Certified SysOps Administrator – Associate
    • AWS Certified Cloud Practitioner
    • Certified Kubernetes Administrator
    • Hashicorp Certified Terraform Associate
    • Oracle Cloud Infrastructure Foundations 2020 – Associate
  • Tips & Tricks
  • Linux commands
You are here: Home / Linux

Why ps output shows UID instead of username

Published: May 9, 2018 | Modified: June 24, 2020



Learn why ps output shows UID instead of username.

PS reads UID instead of username in output

One of our reader asked me:

I see userid in place of the username in ps -ef command output, please explain.

In this article, we will see why ps output shows UID instead of username sometimes. In some recent Linux distributions like RHEL 7, it shows cropped username ending with + sign. Let’s see the reason behind ps doesn’t show username.

Normal ps -ef command output looks like below –

root       541     1  0 17:48 ?        00:00:00 /usr/sbin/NetworkManager --no-da
root       559   541  0 17:48 ?        00:00:00 /sbin/dhclient -d -q -sf /usr/li
root       791     1  0 17:48 ?        00:00:00 /usr/bin/python -Es /usr/sbin/tu
root      1067     1  0 17:48 ?        00:00:00 /usr/libexec/postfix/master -w

where the first column is username who owns that particular process. Sometimes you see output like below –

kernelt+  1354  1335  0 17:50 pts/0    00:00:00 top
OR
1001  1354  1335  0 17:50 pts/0    00:00:00 top

where username in ps output is numeric or cropped username ending with +

This is because ps -ef output restricts username up to 8 characters. If your username is longer than 8 characters then it will display UID or cropped version of it. Here we have kerneltalks user on our server.

# cat /etc/passwd |grep kernel
kerneltalks:x:1001:1001::/home/kerneltalks:/bin/bash

If you observe, user kerneltalks has UID 1001 and hence we could see that UID in ps -ef output.

⇠ Previous article
How to change UID or GID safely in Linux
Next article ⇢
How to resolve setenv: command not found

Related stuff:

  • Difference between tmpfs and swap
  • sar command (Part II) : CPU, Memory reporting
  • lolcat: a tool to rainbow color Linux terminal
  • RHEL 8 BETA installation with screenshots
  • cut command and its examples
  • Documentary films on Linux!
  • How to zip, unzip files and directories in Linux / Unix
  • sar command (Part I): All you need to know with examples
  • SUSE Manager Server 4 installation with screenshots
  • Running a pod in Kubernetes
  • 4 ways to check the size of physical memory (RAM) in Linux
  • NFS configuration in Linux and HPUX

Filed Under: Linux Tagged With: ps doesnt shows usernme, ps shows uid, ps shows userid and not username

If you like my tutorials and if they helped you in any way, then

  • Consider buying me a cup of coffee via paypal!
  • Subscribe to our newsletter here!
  • Like KernelTalks Facebook page.
  • Follow us on Twitter.
  • Add our RSS feed to your feed reader.

Share Your Comments & Feedback: Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get fresh content from KernelTalks

  • Email
  • Facebook
  • RSS
  • Twitter

Get Linux & Unix stuff right into your mailbox. Subscribe now!

* indicates required

This work is licensed under a CC-BY-NC license · Privacy Policy
© Copyright 2016-2026 KernelTalks · All Rights Reserved.
The content is copyrighted to Shrikant Lavhate & can not be reproduced either online or offline without prior permission.