{"id":7911,"date":"2023-01-12T21:24:01","date_gmt":"2023-01-12T12:24:01","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=7911"},"modified":"2023-09-12T22:39:11","modified_gmt":"2023-09-12T13:39:11","slug":"linux%e3%81%a7%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%81%97%e3%81%a6%e3%81%84%e3%82%8b%e3%83%a6%e3%83%bc%e3%82%b6%e3%81%ae%e4%b8%80%e8%a6%a7%e3%82%92%e8%a1%a8%e7%a4%ba%e3%81%99%e3%82%8b%ef%bc%81","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/7911","title":{"rendered":"Linux\u3067\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3044\u308b\u30e6\u30fc\u30b6\u306e\u4e00\u89a7\u3092\u8868\u793a\u3059\u308b\uff01\uff08loginctl\uff0fwho\uff0flast\uff09"},"content":{"rendered":"<p>Linux\u3067\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3044\u308b\u30e6\u30fc\u30b6\u306e\u4e00\u89a7\u3092loginctl\u30b3\u30de\u30f3\u30c9\u3067\u8868\u793a\u3057\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h2>loginctl\u30b3\u30de\u30f3\u30c9\u306e\u30d8\u30eb\u30d7\u3092\u8868\u793a\u3059\u308b\uff01<\/h2>\n<p>loginctl\u30b3\u30de\u30f3\u30c9\u306e\u30d8\u30eb\u30d7\u3092\u8868\u793a\u3057\u3066\u4f7f\u7528\u65b9\u6cd5\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ loginctl --help\r\nloginctl &#x5B;OPTIONS...] COMMAND ...\r\n\r\nSend control commands to or query the login manager.\r\n\r\nSession Commands:\r\n  list-sessions            List sessions\r\n  session-status &#x5B;ID...]   Show session status\r\n  show-session &#x5B;ID...]     Show properties of sessions or the manager\r\n  activate &#x5B;ID]            Activate a session\r\n  lock-session &#x5B;ID...]     Screen lock one or more sessions\r\n  unlock-session &#x5B;ID...]   Screen unlock one or more sessions\r\n  lock-sessions            Screen lock all current sessions\r\n  unlock-sessions          Screen unlock all current sessions\r\n  terminate-session ID...  Terminate one or more sessions\r\n  kill-session ID...       Send signal to processes of a session\r\n\r\nUser Commands:\r\n  list-users               List users\r\n  user-status &#x5B;USER...]    Show user status\r\n  show-user &#x5B;USER...]      Show properties of users or the manager\r\n  enable-linger &#x5B;USER...]  Enable linger state of one or more users\r\n  disable-linger &#x5B;USER...] Disable linger state of one or more users\r\n  terminate-user USER...   Terminate all sessions of one or more users\r\n  kill-user USER...        Send signal to processes of a user\r\n\r\nSeat Commands:\r\n  list-seats               List seats\r\n  seat-status &#x5B;NAME...]    Show seat status\r\n  show-seat &#x5B;NAME...]      Show properties of seats or the manager\r\n  attach NAME DEVICE...    Attach one or more devices to a seat\r\n  flush-devices            Flush all device associations\r\n  terminate-seat NAME...   Terminate all sessions on one or more seats\r\n\r\nOptions:\r\n  -h --help                Show this help\r\n     --version             Show package version\r\n     --no-pager            Do not pipe output into a pager\r\n     --no-legend           Do not show the headers and footers\r\n     --no-ask-password     Don't prompt for password\r\n  -H --host=&#x5B;USER@]HOST    Operate on remote host\r\n  -M --machine=CONTAINER   Operate on local container\r\n  -p --property=NAME       Show only properties by this name\r\n  -P NAME                  Equivalent to --value --property=NAME\r\n  -a --all                 Show all properties, including empty ones\r\n     --value               When showing properties, only print the value\r\n  -l --full                Do not ellipsize output\r\n     --kill-who=WHO        Who to send signal to\r\n  -s --signal=SIGNAL       Which signal to send\r\n  -n --lines=INTEGER       Number of journal entries to show\r\n  -o --output=STRING       Change journal output mode (short, short-precise,\r\n                             short-iso, short-iso-precise, short-full,\r\n                             short-monotonic, short-unix, verbose, export,\r\n                             json, json-pretty, json-sse, json-seq, cat,\r\n                             with-unit)\r\n\r\nSee the loginctl(1) man page for details.\r\n<\/pre>\n<h2>\u30ed\u30b0\u30a4\u30f3\u4e2d\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u4e00\u89a7\u3092\u8868\u793a\u3059\u308b\uff01<\/h2>\n<p>\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u89b3\u70b9\u3067\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3044\u308b\u30e6\u30fc\u30b6\u306e\u4e00\u89a7\u3092\u8868\u793a\u3059\u308b\uff01<\/p>\n<pre class=\"brush: plain; highlight: [1,6]; title: ; notranslate\" title=\"\">\r\n$ loginctl\r\nSESSION  UID USER     SEAT  TTY  \r\n      2 1000 usradmin       pts\/0\r\n      5 1000 usradmin       pts\/1\r\n     c1   42 gdm      seat0 tty1\r\n$ loginctl list-sessions \r\nSESSION  UID USER     SEAT  TTY  \r\n      2 1000 usradmin       pts\/0\r\n      5 1000 usradmin       pts\/1\r\n     c1   42 gdm      seat0 tty1\r\n\r\n3 sessions listed.\r\n&#x5B;usradmin@vmsans01 ~]$ who\r\nusradmin pts\/0        2023-01-11 20:03 (10.1.1.1)\r\nusradmin pts\/1        2023-01-12 21:09 (10.1.1.1)\r\n<\/pre>\n<p>\u5f93\u6765\u306ewho\u30b3\u30de\u30f3\u30c9\u306b\u3042\u305f\u308b\u5185\u5bb9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u304c\u3001\u30ed\u30b0\u30a4\u30f3\u5143\u306eIP\u30a2\u30c9\u30ec\u30b9\u306e\u60c5\u5831\u306f\u8868\u793a\u3055\u308c\u307e\u305b\u3093\u3002<\/p>\n<h2>\u30ed\u30b0\u30a4\u30f3\u4e2d\u306e\u30e6\u30fc\u30b6\u306e\u4e00\u89a7\u3092\u8868\u793a\u3059\u308b\uff01<\/h2>\n<p>\u30ed\u30b0\u30a4\u30f3\u4e2d\u306e\u30e6\u30fc\u30b6\u3092\u30e6\u30fc\u30b6\u540d\u306e\u307f\u306e\u4e00\u89a7\u3067\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,7]; title: ; notranslate\" title=\"\">\r\n$ loginctl list-users \r\n UID USER    \r\n  42 gdm\r\n1000 usradmin\r\n\r\n2 users listed.\r\n$ users\r\nusradmin usradmin\r\n<\/pre>\n<p>\u5f93\u6765\u306eusers\u30b3\u30de\u30f3\u30c9\u306b\u3042\u305f\u308b\u5185\u5bb9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2>\u30ed\u30b0\u30a4\u30f3\u304a\u3088\u3073OS\u518d\u8d77\u52d5\u306e\u5c65\u6b74\u3092\u78ba\u8a8d\u3059\u308b\uff01\uff08last\uff09<\/h2>\n<p>\u30ed\u30b0\u30a4\u30f3\u304a\u3088\u3073OS\u518d\u8d77\u52d5\u306e\u5c65\u6b74\u306f\u3001loginctl\u3067\u306f\u8868\u793a\u3067\u304d\u305a\u3001last\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ last\r\nusradmin pts\/1        10.1.1.1         Thu Jan 12 21:09   still logged in\r\nusradmin pts\/1        10.1.1.1         Thu Jan 12 20:46 - 21:09  (00:22)\r\nusradmin pts\/0        10.1.1.1         Wed Jan 11 20:03 - 21:29 (1+01:25)\r\nreboot   system boot  5.14.0-162.6.1.e Wed Jan 11 20:03   still running\r\nusradmin pts\/0        10.1.1.1         Tue Jan 10 22:00 - crash  (22:03)\r\nreboot   system boot  5.14.0-162.6.1.e Tue Jan 10 21:19   still running\r\nusradmin pts\/1        10.1.1.1         Sun Jan  8 17:30 - 17:30  (00:00)\r\n...\r\n<\/pre>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3044\u308b\u30e6\u30fc\u30b6\u306e\u4e00\u89a7\u306f\u3001loginctl\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u898b\u3084\u3059\u3044\u4e00\u89a7\u3067\u8868\u793a\u3055\u308c\u307e\u3059\u304c\u3001\u30ed\u30b0\u30a4\u30f3\u5143\u306bIP\u30a2\u30c9\u30ec\u30b9\u304c\u8868\u793a\u3067\u304d\u306a\u3044\u306e\u304c\u6b8b\u5ff5\u306a\u3068\u3053\u308d\u3067\u3059\u3002<\/p>\n<h2>\u95a2\u9023\u8a18\u4e8b<\/h2>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/8881\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Linux\u306e\u30b7\u30b9\u30c6\u30e0\u306e\u7a3c\u50cd\u72b6\u6cc1\u3092\u78ba\u8a8d\u3059\u308b\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2021\/02\/fi_linux_01-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Linux\u306e\u30b7\u30b9\u30c6\u30e0\u306e\u7a3c\u50cd\u72b6\u6cc1\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/div><div class=\"substr\">Linux\u306e\u30b7\u30b9\u30c6\u30e0\u306e\u7a3c\u50cd\u72b6\u6cc1\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306e\u8a18\u4e8b\u4e00\u89a7\u3067\u3059\u3002...<\/div><\/a><\/div>\n<h2>\u95a2\u9023\u66f8\u7c4d\uff08Amazon\uff09<\/h2>\n<p><a href=\"https:\/\/amzn.to\/3H5qkUu\" rel=\"noopener\" target=\"_blank\"><img decoding=\"async\" class=\"paapi5-pa-product-image-source\" src=\"https:\/\/m.media-amazon.com\/images\/I\/51ZPkoBGdZL._SL160_.jpg\" alt=\"N\/A\"><\/a><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux\u3067\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3044\u308b\u30e6\u30fc\u30b6\u306e\u4e00\u89a7\u3092loginctl\u30b3\u30de\u30f3\u30c9\u3067\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":5527,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[193],"tags":[],"class_list":["post-7911","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-monitoring-linux-basics"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/7911","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/comments?post=7911"}],"version-history":[{"count":1,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/7911\/revisions"}],"predecessor-version":[{"id":15048,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/7911\/revisions\/15048"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media\/5527"}],"wp:attachment":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media?parent=7911"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=7911"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=7911"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}