How to display longer username in `ps`

Photo of author
Written By Jan Reilink

Windows Server systems administrator & enthusiast.

Have you ever had the need to show the full username in ps output? Here is how. Normally in Bash, the ps output truncates an username to 7 characters and a + sign, e.g IUSR_60+. In cases when you absolutely need the full username in ps, this can be pretty annoying. Here is how to display longer usernames in ps:

To display 20 characters, use user:20:

ps axo user:20
Code language: Bash (bash)

If you also want the PID of the running process, add ,pid: ps axo user:20,pid. You can even add pmem of memory:

ps axo user:20,pid,pmem
Code language: Bash (bash)

Play with it, learn the different options and use what’s best in each case.

Did you like: How to display longer username in `ps`

Then please, take a second to support Sysadmins of the North and donate!

Your generosity helps pay for the ongoing costs associated with running this website like coffee, hosting services, library mirrors, domain renewals, time for article research, and coffee, just to name a few.

Hi! Join the discussion, leave a reply!