Re: How find my process id for my shell

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dan Track wrote:
> Hi
>
> I'm logged in at the moment, how do I find my process id for the shell
> I'm in, given that there are loads of other shells aswell. I'm using
> bash?
>
> Thanks
> Dan

Hi,

What about ps -ef | grep -i bash ?
If you get something like this, then you can find out the process id
of all the shells.


$ ps -ef | grep -i bash

   2872  2699  0 10:38 ?        00:00:00 /bin/bash /etc/gdm/Xsession
gnome-session
   2895  2699  0 10:38 ?        00:00:00 /usr/bin/ssh-agent /bin/sh -c
exec -l /bin/bash -c "gnome-session"
   4766  4763  1 11:07 pts/1    00:00:00 bash
   4808  4763  1 11:07 pts/2    00:00:00 bash
   4818  4763  1 11:07 pts/3    00:00:00 bash
   4827  4763  1 11:07 pts/4    00:00:00 bash
   4838  4763  1 11:07 pts/5    00:00:00 bash
   4977  4766  0 11:07 pts/1    00:00:00 grep -i bash


Hope that was what you were looking for.

Regards,
Amit.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAki7gAYACgkQisV6fTFpwA2M/ACgzqk40jYgN4piotX+bBhlWPtQ
wwAAoKdFosnaedBFAzTPT8VG269fiXwu
=UjFz
-----END PGP SIGNATURE-----

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux