Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I would like to know what is the [program] --> what does the [] means? also, what is the [program /0] means : what does /0 means? and why some programs appear as : program [another-program] --> (in [another-program])... why doesn't all the [program] has /0 in the end?
It's been a while but IIRC:
When a command name appears in brackets - this means that ps could not find out what command was actually run to get the process going, but that name is what got stored by the kernel. i.e. it's an educated guess.
When it says [program-name/0] (notice - no spaces) there is more than one instance of that command in the list. The next one is [program-name/1] and so on.
Where you got program[another-program] ... you'll find that "another-program" = kdeinit ... which is associated with other KDE processes. Which makes me wonder if I really "RC" in that IIRC before.
Running a '/bin/ps axf -eo ppid,sid,pid,cmd --sort=pid' "forest" view might paint a cleaner picture. With respect to the first case (as mentioned by Simon Bridge) low PID processes having process names between brackets, on a 2.6 kernel you should see PID 2 being kthreadd and all the processes being children of PID 2, having PPID == 2. Those are in-kernel processes. On a 2.4 kernel there is no kthreadd so those process names just appear bracketed and often with a low PID. With respect to the third case, with userland processes you might also find bracketed contents provide process information. Like: 'init [$RUNLEVEL]' or 'sshd: $LOGNAME [privilege separation thread]'.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.