{"id":2798,"date":"2012-04-16T22:38:11","date_gmt":"2012-04-16T14:38:11","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=2798"},"modified":"2023-04-28T09:49:36","modified_gmt":"2023-04-28T09:49:36","slug":"how-display-logged-in-user-information-and-terminal-number-on-linux-server","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-display-logged-in-user-information-and-terminal-number-on-linux-server\/","title":{"rendered":"How Display Logged in User Information and Terminal number on Linux Server"},"content":{"rendered":"<p>In this post i will show on how to display logged in user information and terminal number on Linux server. This post provides practical examples for future references. This steps has been tested on Redhat Linux Enterprise server 6 and may working CentOS server as well.<\/p>\n<p>1. &#8220;<strong>who am <\/strong>i&#8221; command is use to display the username of currently logged.<\/p>\n<pre>\n[root@rhel6 ~]# who am i\nroot     pts\/1        2012-04-17 06:14 (192.168.1.52)\n<\/pre>\n<p>2. <strong>who<\/strong> command will display all the user currently logged in all terminals.<\/p>\n<pre>\n[root@rhel6 ~]# who\nroot     tty1         2012-04-17 04:29\nroot     pts\/0        2012-04-17 04:29 (192.168.1.52)\nroot     pts\/1        2012-04-17 06:14 (192.168.1.52)\nroot     pts\/2        2012-04-17 06:01 (192.168.1.52)\n<\/pre>\n<p>3. <strong>tty<\/strong> command is used to display the terminal number of currently logged in terminals.<\/p>\n<pre>\n[root@rhel6 ~]# tty\n\/dev\/pts\/1\n<\/pre>\n<p>4. The <strong>w<\/strong> command shows who is logged in to the system and what they are doing.<\/p>\n<pre>\n[root@rhel6 ~]# w\n 06:18:39 up  1:50,  4 users,  load average: 0.02, 0.02, 0.00\nUSER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT\nroot     tty1     -                04:29    1:48m  4.80s  4.78s ping www.google.com\nroot     pts\/0    192.168.1.52     04:29    1:49m  0.02s  0.02s -bash\nroot     pts\/1    192.168.1.52     06:14    0.00s  0.05s  0.01s w\nroot     pts\/2    192.168.1.52     06:01   26.00s  0.11s  0.03s -bash\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In this post i will show on how to display logged in user information and terminal number on Linux server. This post provides practical examples for future references. This steps&#8230;<\/p>\n","protected":false},"author":6,"featured_media":1499,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[2055,2058],"tags":[1244,1246,1248,1253,1536,1546,1713,1715],"class_list":["post-2798","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-rhel","tag-centos","tag-centos-5-5","tag-centos-5-7","tag-centos-6-2","tag-linux","tag-linux-utilities","tag-rhel","tag-rhel-6"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/2798","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=2798"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/2798\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/1499"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=2798"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=2798"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=2798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}