Читать книгу Linux Bible - Christopher Negus - Страница 92
NOTE
ОглавлениеLinux distributions that have Security Enhanced Linux (SELinux) enabled, such as Fedora and RHEL, show additional information at the end of the id
output. That output might look something like the following:
context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
SELinux provides a means of tightly locking down the security of a Linux system. See Chapter 24, “Enhancing Linux Security with SELinux,” if you want to learn about SELinux.
You can see information about your current login session by using the who
command. In the following example, the -u
option says to add information about idle time and the process ID and -H
asks that a header be printed:
$ who -uH NAME LINE TIME IDLE PID COMMENT chris tty1 Jan 13 20:57 . 2019
The output from this who
command shows that the user chris
is logged in on tty1
(which is the first virtual console on the monitor connected to the computer) and his login session began at 20:57 on January 13. The IDLE
time shows how long the shell has been open without any command being typed (the dot indicates that it is currently active). PID
shows the process ID of the user's login shell. COMMENT
would show the name of the remote computer from which the user had logged in, if that user had logged in from another computer on the network, or the name of the local X display if that user were using a Terminal window (such as :0.0).