{"id":22055,"date":"2023-10-01T15:35:19","date_gmt":"2023-10-01T15:35:19","guid":{"rendered":"https:\/\/linuxways.net\/?p=22055"},"modified":"2023-10-01T15:35:36","modified_gmt":"2023-10-01T15:35:36","slug":"how-to-see-logged-in-users-in-linux-ubuntu","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-to-see-logged-in-users-in-linux-ubuntu\/","title":{"rendered":"How to see Logged in Users in Linux\/Ubuntu?"},"content":{"rendered":"<p>Ubuntu is designed to support multiple users. The administrator has the specific commands and utility tools to check which users are currently logged in to the server. Ubuntu is widely used as a server and the need for checking logged-in users is crucial. Administrators can check for unauthorized access to the systems, manage user permissions, and troubleshoot problems while checking the logged-in users.<\/p>\n<p>This article elaborates on multiple methods used to check the currently logged-in Users in Ubuntu.<\/p>\n<h2><strong>How to see Logged-In Users in Linux\/Ubuntu?<\/strong><\/h2>\n<p>In Ubuntu, different approaches can be followed to list logged-in users. All the methods that can be used to display the currently logged-in users are:<\/p>\n<ul>\n<li>Using \u201cusers\u201d Command<\/li>\n<li>Using \u201cw\u201d Command<\/li>\n<li>Using \u201cwho\u201d Command<\/li>\n<li>Using \u201cps au\u201d Command<\/li>\n<li>Using Finger Utility Tool<\/li>\n<\/ul>\n<p>All the methods are discussed in detail below.<\/p>\n<h2><strong>Method 1: See Logged-In Users using the \u201cusers\u201d command<\/strong><\/h2>\n<p>The \u201cusers\u201d command lists the currently logged-in users in Ubuntu. It only displays the names of the logged-in users. Use the \u201cusers\u201d command as:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">users<\/span><\/div><\/div>\n<p>The logged-in users will be listed in the terminal:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"628\" height=\"134\" class=\"wp-image-22056\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-1.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-1.png 628w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-1-300x64.png 300w\" sizes=\"auto, (max-width: 628px) 100vw, 628px\" \/><\/p>\n<h2><strong>Method 2: See Logged-In Users using the \u201cw\u201d command<\/strong><\/h2>\n<p>The \u201cw\u201d command is the fastest way to check users currently logged in to Ubuntu and monitor their activity. To display logged-in users with \u201cw\u201d, use the command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">w<\/span><\/div><\/div>\n<p>The \u201cw\u201d command will display the name of the currently logged-in user, the \u201ctty\u201d number which is the user machine Number, the User\u2019s Login Time, Recent Command Executed by the User, and some other columns:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1098\" height=\"157\" class=\"wp-image-22057\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-2.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-2.png 1098w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-2-300x43.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-2-1024x146.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-2-768x110.png 768w\" sizes=\"auto, (max-width: 1098px) 100vw, 1098px\" \/><\/p>\n<h2><strong>Method 3: See Logged-In Users using the \u201cwho\u201d command<\/strong><\/h2>\n<p>The \u201cwho\u201d command will list the username of users currently logged in to Ubuntu. Use the \u201cwho\u201d command with the flag:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">who<\/span> <span class=\"re5\">-H<\/span><\/div><\/div>\n<p>The \u201c-H\u201d flag enhances reliability and shows the Headers. It will display the logged-in user name, the Machine Number, and the Log In Time:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1104\" height=\"130\" class=\"wp-image-22058\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-3.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-3.png 1104w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-3-300x35.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-3-1024x121.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-3-768x90.png 768w\" sizes=\"auto, (max-width: 1104px) 100vw, 1104px\" \/><\/p>\n<h2><strong>Method 4: See Logged-In Users using the \u201cFinger Utility Tool\u201d<\/strong><\/h2>\n<p>The \u201cFinger Utility Tool\u201d is an interface that displays the current users logged in to Ubuntu. The finger utility has to be installed first as it is not added by default. Install the Finger Utility using the command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt <span class=\"kw2\">install<\/span> finger<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"972\" height=\"369\" class=\"wp-image-22059\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-4.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-4.png 972w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-4-300x114.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-4-768x292.png 768w\" sizes=\"auto, (max-width: 972px) 100vw, 972px\" \/><\/p>\n<p>When installed, display the information using the \u201cfinger\u201d command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">finger<\/div><\/div>\n<p>The \u201cidle\u201d displays if the user is idle and for how much time:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"88\" class=\"wp-image-22060\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-5.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-5.png 975w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-5-300x27.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-5-768x69.png 768w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/p>\n<h2><strong>Method 5: See Logged-In Users using the \u201cps au\u201d command<\/strong><\/h2>\n<p>To list the logged-in users, the \u201cpu au\u201d Command can also be used. The \u201cps au\u201d command displays the users who are logged in to Ubuntu and monitors the applications they are running. The \u201cpu au\u201d command in Ubuntu is used as:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">ps<\/span> au<\/div><\/div>\n<p>It will display the User Name, the Process ID of any processes run by the user, the Commands used by the user, the Machine Number, the start time of the process, and some other options:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1116\" height=\"204\" class=\"wp-image-22061\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-6.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-6.png 1116w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-6-300x55.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-6-1024x187.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22055-6-768x140.png 768w\" sizes=\"auto, (max-width: 1116px) 100vw, 1116px\" \/><\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>The Command Line Interface is used for displaying the currently logged-in users by Administrators as it is more flexible and reliable. The logged-in users can be displayed using any of the \u201cuser\u201d, \u201cwho\u201d, \u201cw\u201d, \u201cps au\u201d Commands, or the Finger Utility Tool. This article explains the methods to see logged-in users in Ubuntu.<\/p>","protected":false},"excerpt":{"rendered":"<p>To display the logged-in users in Ubuntu use any of the \u201cuser\u201d, \u201cwho\u201d, \u201cw\u201d, \u201cps au\u201d Commands, or the Finger Utility Tool.<\/p>","protected":false},"author":110,"featured_media":22062,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1049,2],"tags":[],"class_list":["post-22055","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-commands","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/22055","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/110"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=22055"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/22055\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/22062"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=22055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=22055"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=22055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}