How find my process id for my shell
joachim.backes at rhrk.uni-kl.de
joachim.backes at rhrk.uni-kl.de
Mon Sep 1 07:06:07 UTC 2008
Amitakhya Phukan wrote:
> -----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
echo $$
>
> 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-----
>
--
Joachim Backes <joachim.backes at rhrk.uni-kl.de>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6101 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20080901/13ba51ee/attachment-0001.bin>
More information about the fedora-list
mailing list