在阅读有关 Linux 的文章时,我了解到:: 默认情况下,Linux 区分几种帐户类型,以便隔离processes
和workloads
。Linux 有四种类型的帐户:
根
系统
普通的
网络
现在,当我在 shell 上尝试 $last 时,我得到了:
anupam@JAZZ:~$ last
anupam pts/0 :0 Fri Oct 10 09:38 still logged in
anupam tty1 Fri Oct 10 09:35 still logged in
anupam :0 :0 Fri Oct 10 09:27 still logged in
reboot system boot 3.13.0-36-generi Fri Oct 10 09:26 - 09:39 (00:12)
anupam pts/24 :0 Thu Oct 9 23:57 - 23:58 (00:00)
anupam pts/23 :0 Thu Oct 9 23:26 - 23:58 (00:31)
anupam pts/9 :0 Thu Oct 9 23:07 - 23:58 (00:50)
anupam pts/0 :0 Thu Oct 9 23:05 - down (01:23)
anupam :0 :0 Thu Oct 9 22:50 - down (01:37)
reboot system boot 3.13.0-36-generi Thu Oct 9 22:50 - 00:28 (01:38)
anupam pts/0 :0 Thu Oct 9 21:44 - down (01:05)
anupam :0 :0 Thu Oct 9 18:57 - down (03:52)
reboot system boot 3.13.0-36-generi Thu Oct 9 18:56 - 22:49 (03:52)
anupam pts/0 :0 Thu Oct 9 11:07 - crash (07:49)
anupam :0 :0 Thu Oct 9 10:58 - crash (07:58)
reboot system boot 3.13.0-36-generi Thu Oct 9 10:58 - 22:49 (11:51)
anupam pts/10 :0 Thu Oct 9 01:30 - 02:21 (00:51)
anupam pts/0 :0 Wed Oct 8 22:56 - 02:34 (03:38)
anupam pts/0 :0 Wed Oct 8 18:50 - 21:19 (02:29)
anupam pts/0 :0 Wed Oct 8 18:09 - 18:50 (00:40)
anupam :0 :0 Wed Oct 8 17:50 - down (08:44)
reboot system boot 3.13.0-36-generi Wed Oct 8 17:50 - 02:34 (08:44)
anupam pts/0 :0 Wed Oct 8 12:33 - 12:33 (00:00)
anupam :0 :0 Wed Oct 8 10:35 - down (07:14)
reboot system boot 3.13.0-36-generi Wed Oct 8 10:34 - 17:49 (07:14)
anupam :0 :0 Tue Oct 7 20:13 - down (13:41)
reboot system boot 3.13.0-36-generi Tue Oct 7 20:13 - 09:55 (13:41)
anupam tty1 Tue Oct 7 20:09 - down (00:02)
anupam pts/23 :0 Tue Oct 7 20:00 - down (00:11)
anupam pts/16 :0 Tue Oct 7 19:54 - down (00:17)
anupam pts/0 :0 Tue Oct 7 16:45 - down (03:26)
anupam :0 :0 Tue Oct 7 16:32 - down (03:39)
reboot system boot 3.13.0-36-generi Tue Oct 7 16:32 - 20:11 (03:39)
anupam pts/0 :0 Tue Oct 7 10:48 - 16:31 (05:42)
anupam :0 :0 Tue Oct 7 10:09 - down (06:21)
reboot system boot 3.13.0-36-generi Tue Oct 7 10:08 - 16:31 (06:22)
anupam :0 :0 Mon Oct 6 23:35 - down (02:15)
reboot system boot 3.13.0-36-generi Mon Oct 6 23:35 - 01:50 (02:15)
anupam pts/3 :0 Mon Oct 6 22:53 - down (00:11)
anupam pts/0 :0 Mon Oct 6 22:40 - 23:04 (00:24)
anupam pts/0 :0 Mon Oct 6 11:26 - 19:07 (07:40)
anupam tty1 Mon Oct 6 10:48 - down (12:16)
anupam pts/0 :0 Mon Oct 6 10:47 - 11:26 (00:39)
anupam :0 :0 Mon Oct 6 10:09 - down (12:55)
reboot system boot 3.13.0-36-generi Mon Oct 6 10:08 - 23:05 (12:56)
anupam :0 :0 Sun Oct 5 13:21 - down (19:59)
reboot system boot 3.13.0-36-generi Sun Oct 5 13:21 - 09:21 (19:59)
anupam :0 :0 Sun Oct 5 08:37 - down (04:43)
reboot system boot 3.13.0-36-generi Sun Oct 5 08:36 - 13:20 (04:43)
anupam tty1 Sat Oct 4 18:29 - down (07:23)
anupam :0 :0 Sat Oct 4 16:22 - down (09:30)
reboot system boot 3.13.0-36-generi Sat Oct 4 16:21 - 01:52 (09:30)
anupam pts/9 :0 Sat Oct 4 12:37 - down (03:43)
anupam pts/0 :0 Sat Oct 4 10:49 - down (05:31)
anupam :0 :0 Sat Oct 4 09:00 - down (07:19)
reboot system boot 3.13.0-36-generi Sat Oct 4 09:00 - 16:20 (07:20)
anupam :0 :0 Fri Oct 3 20:49 - down (12:09)
anupam tty1 Fri Oct 3 20:48 - down (12:10)
anupam :0 :0 Fri Oct 3 12:39 - 20:49 (08:09)
reboot system boot 3.13.0-36-generi Fri Oct 3 12:39 - 08:59 (20:19)
anupam pts/13 :0 Fri Oct 3 00:50 - down (01:38)
anupam pts/7 :0 Thu Oct 2 23:33 - down (02:54)
anupam tty1 Thu Oct 2 23:27 - down (03:01)
anupam tty2 Thu Oct 2 22:27 - 23:06 (00:38)
anupam pts/7 :0 Thu Oct 2 19:42 - 23:04 (03:21)
anupam pts/7 :0 Thu Oct 2 19:34 - 19:42 (00:08)
anupam pts/7 :0 Thu Oct 2 19:24 - 19:24 (00:00)
anupam pts/0 :0 Thu Oct 2 19:24 - down (07:03)
anupam tty1 Thu Oct 2 18:24 - 23:06 (04:42)
anupam :0 :0 Thu Oct 2 15:48 - down (10:39)
reboot system boot 3.13.0-36-generi Thu Oct 2 15:48 - 02:28 (10:40)
anupam pts/0 :0 Thu Oct 2 11:18 - 15:45 (04:26)
anupam :0 :0 Thu Oct 2 10:11 - down (05:34)
reboot system boot 3.13.0-36-generi Thu Oct 2 09:33 - 15:45 (06:12)
anupam pts/0 :0 Wed Oct 1 19:08 - 01:40 (06:31)
anupam :0 :0 Wed Oct 1 18:28 - down (07:14)
reboot system boot 3.13.0-36-generi Wed Oct 1 18:28 - 01:43 (07:14)
wtmp begins Wed Oct 1 15:18:10 2014
在这里,我只是得到了第二个属性的System Account type
对应内容system boot
,,我可以获得一些其他命令来与其他帐户类型进行交互吗?即Network,Normal
(我想我正在运行它,不是吗?),Root
(通过使用 sudo,不是吗?),,最后一行是什么wtmp begins Wed Oct 1 15:18:10 2014
意思?
答案1
最后一行 wtmp begins Wed Oct 1 15:18:10 2014 是什么意思?
这意味着您的系统从 2014 年 10 月 1 日星期三 15:18:10 开始写入登录活动的日志记录。
wtmp 是将登录活动写入日志文件的过程。因此,如果您想查看登录活动,那么您可以从 wtmp 开始运行的那一刻开始看到。
欲了解更多信息,您可以查看它的手册页并且 Google 是您的朋友。
希望能帮助到你。