{"id":1500,"date":"2017-05-25T11:40:24","date_gmt":"2017-05-25T15:40:24","guid":{"rendered":"https:\/\/easy-admin.ca\/?p=1500"},"modified":"2017-05-25T11:43:24","modified_gmt":"2017-05-25T15:43:24","slug":"how-to-read-or-view-utmp-wtmp-and-btmp-files-in-linux","status":"publish","type":"post","link":"https:\/\/easy-admin.ca\/index.php\/2017\/05\/25\/how-to-read-or-view-utmp-wtmp-and-btmp-files-in-linux\/","title":{"rendered":"How to read or view utmp, wtmp and btmp files in Linux"},"content":{"rendered":"<p>In Linux operating systems everything is logged some where. Most of the system logs are logged in to \/var\/log folder. This folder contains logs related to different services and applications. In this folder we have some files such as <strong>utmp<\/strong>, <strong>wtmp<\/strong> and <strong>btmp<\/strong>. These files contains all the details about login\u2019s and logout\u2019s which are from local as well as from remote systems and system status such as uptime etc.<\/p>\n<p><strong>utmp<\/strong> will give you complete picture of users logins at which terminals, logouts, system events and current status of the system, system boot time (used by uptime) etc.<\/p>\n<p><strong>wtmp<\/strong> gives historical data of utmp.<\/p>\n<p><strong>btmp<\/strong> records only failed login attempts.<\/p>\n<p><strong>Provide how logged in, when they logged in and when they logged out<br \/>\n<\/strong># last<\/p>\n<p><strong>To open wtmp file and view its content use blow command<br \/>\n<\/strong># last -f \/var\/log\/wtmp<\/p>\n<p><strong>To see still logged in users view utmp file use last command<br \/>\n<\/strong># last -f \/var\/run\/utmp<\/p>\n<p><strong>To view btmp file use same command<br \/>\n<\/strong># last -f \/var\/log\/btmp<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Linux operating systems everything is logged some where. Most of the system logs are logged in to \/var\/log folder. This folder contains logs related to different services and applications. In this folder we have some files such as utmp, wtmp and btmp. These files contains all the details about login\u2019s and logout\u2019s which are &hellip; <a href=\"https:\/\/easy-admin.ca\/index.php\/2017\/05\/25\/how-to-read-or-view-utmp-wtmp-and-btmp-files-in-linux\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">How to read or view utmp, wtmp and btmp files in Linux<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"How to read or view utmp, wtmp and btmp files in Linux - HP Server","description":"In Linux operating systems everything is logged some where. Most of the system logs are logged in to \/var\/log folder. This folder contains logs related to diffe"},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1500","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/posts\/1500","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/comments?post=1500"}],"version-history":[{"count":0,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/posts\/1500\/revisions"}],"wp:attachment":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/media?parent=1500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/categories?post=1500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/tags?post=1500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}