{"id":14151,"date":"2023-04-24T16:37:49","date_gmt":"2023-04-24T16:37:49","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=14151"},"modified":"2023-10-07T14:39:13","modified_gmt":"2023-10-07T14:39:13","slug":"how-to-check-current-users-in-ubuntu","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-check-current-users-in-ubuntu\/","title":{"rendered":"How to Check Current Users in Ubuntu"},"content":{"rendered":"<p><img decoding=\"async\" data-src=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2023\/04\/How-to-Check-Current-Users-in-Ubuntu-1024x878.jpg\" alt=\"How to Check Current Users in Ubuntu\" width=\"1024\" height=\"878\" class=\"alignnone size-large wp-image-18485 lazyload\" data-srcset=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2023\/04\/How-to-Check-Current-Users-in-Ubuntu-1024x878.jpg 1024w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2023\/04\/How-to-Check-Current-Users-in-Ubuntu-300x257.jpg 300w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2023\/04\/How-to-Check-Current-Users-in-Ubuntu-128x110.jpg 128w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2023\/04\/How-to-Check-Current-Users-in-Ubuntu-420x360.jpg 420w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2023\/04\/How-to-Check-Current-Users-in-Ubuntu-540x463.jpg 540w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2023\/04\/How-to-Check-Current-Users-in-Ubuntu-720x617.jpg 720w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2023\/04\/How-to-Check-Current-Users-in-Ubuntu-960x823.jpg 960w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2023\/04\/How-to-Check-Current-Users-in-Ubuntu-1140x977.jpg 1140w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2023\/04\/How-to-Check-Current-Users-in-Ubuntu-1166x999.jpg 1166w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2023\/04\/How-to-Check-Current-Users-in-Ubuntu-840x720.jpg 840w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2023\/04\/How-to-Check-Current-Users-in-Ubuntu-1260x1080.jpg 1260w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2023\/04\/How-to-Check-Current-Users-in-Ubuntu.jpg 1400w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/878;\" \/><\/p>\n<p>In <a href=\"https:\/\/webhostinggeeks.com\/blog\/what-is-ubuntu-beginners-guide-ubuntu-linux-distro\/\">Ubuntu<\/a>, you can check the current users using different methods. It is important to know who is currently logged in to your system, especially when you are working in a multi-user environment or managing a <a href=\"https:\/\/webhostinggeeks.com\/blog\/what-are-web-servers-and-why-are-they-needed\/\">web server<\/a>.<\/p>\n<p>In this short guide, we will go through the steps to check current users in Ubuntu using the &#8220;who&#8221; and &#8220;w&#8221; commands.<\/p>\n<h2>Step 1: Check Current Users Using the &#8220;who&#8221; Command<\/h2>\n<p>The &#8220;who&#8221; command displays the list of all currently logged in users on the system. To use this command, open a terminal and type the following command:<\/p>\n<pre>\r\nwho\r\n<\/pre>\n<p>The output will display a list of currently logged in users, including their username, terminal, and login time.<\/p>\n<pre>\r\nnick     pts\/1        2023-04-24 15:27 (45.131.193.38)\r\ndmitry     pts\/2        2023-04-24 15:57 (45.131.193.38)\r\n<\/pre>\n<h2>Step 2: Check Current Users Using the &#8220;w&#8221; Command<\/h2>\n<p>The &#8220;w&#8221; command displays a more detailed output of the currently logged in users, including their username, terminal, login time, idle time, and process information. To use this command, open a terminal and type the following command:<\/p>\n<pre>\r\nw\r\n<\/pre>\n<p>The output will display the information about the currently logged in users in a table format.<\/p>\n<pre>\r\n 16:36:04 up  7:25,  2 users,  load average: 0.00, 0.00, 0.00\r\nUSER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT\r\nnick     pts\/1    45.131.193.38    15:27    1:03m  0.02s  0.02s -bash\r\ndmitry     pts\/2    45.131.193.38    15:57    0.00s  0.03s  0.00s w\r\n<\/pre>\n<h2>Step 3: Check Current User&#8217;s Information Using the &#8220;whoami&#8221; Command<\/h2>\n<p>The &#8220;whoami&#8221; command displays the current user&#8217;s username. To use this command, open a terminal and type the following command:<\/p>\n<pre>\r\nwhoami\r\n<\/pre>\n<p>The output will display the username of the current user.<\/p>\n<pre>\r\ndmitry\r\n<\/pre>\n<h2>Commands Mentioned:<\/h2>\n<ul>\n<li><span class=\"fw-bold\">who<\/span> &#8211; a command that displays the list of all currently logged in users on the system.<\/li>\n<li><span class=\"fw-bold\">w<\/span> &#8211; a command that displays a more detailed output of the currently logged in users.<\/li>\n<li><span class=\"fw-bold\">whoami<\/span> &#8211; a command that displays the current user&#8217;s username.<\/li>\n<\/ul>\n<h2>Conclusion:<\/h2>\n<p>In this guide, we have outlined the steps to check the current users in Ubuntu using the &#8220;who&#8221;, &#8220;w&#8221;, and &#8220;whoami&#8221; commands. By using these commands, you can easily obtain the necessary information about the current users on your system.<\/p>\n<p>If you have any questions or suggestions, feel free to comment below.<\/p>\n<p>Navigating the world of Ubuntu hosting? Let us simplify it for you. we&#8217;ve rigorously tested and curated a list of the standout hosting providers for 2023. Don&#8217;t miss out on our &#8216;<a href=\"https:\/\/webhostinggeeks.com\/best\/ubuntu-hosting\/\">Best Ubuntu Hosting 2023<\/a>&#8216; article to elevate your online presence.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Ubuntu, you can check the current users using different methods. It is important to know who is currently logged in to your system, especially when you are working in&#8230;<\/p>\n","protected":false},"author":6,"featured_media":18485,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[996,1073],"tags":[1856],"class_list":["post-14151","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-ubuntu","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/14151","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=14151"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/14151\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/18485"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=14151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=14151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=14151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}