This is strange:

» ps -ef | grep gitlab
gitlab-+ 19663  4237  0 06:45 ?        00:00:00 postgres: gitlab gitlabhq_production [local] idle

But the gitlab-+ user does not exist:

» cat /etc/passwd | grep gitlab

Why could that be?

How can I tell ps to show me the user id instead of the user name, for all entries?

2 Answers 2


Use n parameter, described in manual page:

n      Numeric output for WCHAN and USER (including all types of UID and GID)


ps -ef n

N.B. there should be space, not dash before n


The + sign at the end of the UID field just means "the username is longer than 8 characters and did not fit here".

For historical reasons, the field widths of ps -ef output have been kept as they are, even when usernames longer than 8 characters have become common: mostly because there are a lot of scripts that parse its output and would fail in mysterious ways if the field widths would change.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.