Generally, you will find that the user name has been displayed at the console command prompt. However, some shells do not display your username by default, such as csh. Therefore, this command should be used on shell terminals that cannot display the user name back.How to run whoami
To run this command, you only need to enter whoami. In the following example, we use the csh shell terminal.
%
WhoAmI
Function Description:
Show user Name
Grammar:
WhoAmI
Supplementary Note:
Display the user name of oneself, this instruction is equivalent to execute id-un instruction
The difference between WhoAmI and who am I
The WHO command focuses on viewing current users who are logged on to this machine
The role of WHO-M is the same as that of who am I
Who a
Differences between linux who am I and whoami
Who am I displays the actual user name, that is, the user ID when the user logs on. This command is equivalent to who-m.
Whoami displays the valid user ID, the user name of the current "Operation user.
In most cases, the actual user ID is the same as the valid user ID.
Who-q is used to display the number of currently logged-on users.
If you think the output
In Linux, the WHO series commands exist who/whoami/who am I.First of all, I have an ordinary user guixian001 system. Then execute the command whoami/who am i/who to execute the command separately. As follows:650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6C/B9/wKioL1VRZYrjh8jCAACd9ikK2sU994.jpg "title=" Qq20150512102223.jpg "alt=" Wkiol1vrzyrjh8jcaacd9ikk2su994.jpg "/>We then use the SU command
WhoAmIFunction Description:Show user NameGrammar:WhoAmIAdditional notes:Display its own user name, this directive is equivalent to executing the id-un instructionThe difference between WhoAmI and who am I The WHO command is focused on seeing which users are currently logged on to this machineThe role of who-m and the role of Who am I is the sameWho am I displays the actual user's username, which is the user ID when the user logs in. This command is eq
The WHO, W, and WhoAmI commands can display logged-in user names, but usage and usage effects vary, so let's look at the usage of these three commands and their differences.1. Who command: Displays user information that is currently logged into the system and does not display the user's login via the SU command:[email protected] ~]# whoRoot Tty1 2015-08-19 16:23Root pts/0 2015-08-27 01:08 (192.168.1.254)Root PTS/1 2015-08-27 02:57 (192.168.1.254)2, W
Command function: Display information of logged-in userCommand format:Common options:Example:W shows the logged in user and the operation in progress[Email protected] ~]# W11:22:01 up 4 days, 21:22, 3 users, Load average:0.00, 0.00, 0.00USER TTY from [email protected] IDLE jcpu PCPURoot tty1-thu14 4days 0.19s 0.19s-bashRoot pts/0 172.31.3.32 Thu14 0.00s 0.73s 0.00s WRoot pts/1 172.31.3.32 11:18 1:50 0.07s 0.02s-bashWho shows the logged in username, terminal name, logon time, and login IP[email p
Several common small commands for viewing logged-in users:1, W : Displays the currently logged on user and what they are doing[Email protected] usr]# W10:02:06 up 2 days, 2:06, 1 user, Load average:0.00, 0.00, 0.00USER TTY from [email protected] IDLE jcpu PCPURoot pts/0 10.109.134.247 Mon09 0.00s 0.40s 0.15s W2, WhoAmI display the current login system valid user name[Email protected] usr]# WhoAmIRoot3. Who shows which users are currently logged inWho-
]# Getfacl Inittab# File:inittab# Owner:root# Group:rootuser::rw-user:hadoop:rw-group::r--mask::rw-other::r--[Email protected] backup]#
WHOAMI: Displays the currently logged on user[Email protected] backup]# WhoAmIRoot[Email protected] backup]#Terminal (terminal, or physical terminal):is a device, not a program, typically a device that provides a command-line user interface, typically a screen and keyboard, or some other physical terminal
First, let's take a look at the different results of the three commands entered by common users and root users:
The difference is that whoami displays the User Name of the current "Operation user", while who am I displays the User Name of the "Login User.
The Linux term is as follows: (actual user = uid, that is, user ID. Valid user = EUID, I .e. valid user ID)
Who am I displays the actual user name, that is, the user ID when the user logs on. Thi
corresponding to dead processes.'-P ''--process 'List active processes spawned by Init.'-P ''--process 'List active processes spawned by Init.2. Slightly detailed results than WhoAmI'-M 'Same as ' Who am I '.3. Display the total number of users logged in'-Q ''--count 'Print only the login names and the number of users logged on.Overrides all other options.4. Other'--lookup 'Attempt to canonicalize Hostnames found in utmp through a DNSLookup. This isn
W who whoami last Lastb lastlog basename sleep hostname mail################################################W.H.O.WhoAmILast: Displays the/var/log/wtmp file, showing the user login history and System restart historyLastb:/var/log/btmp file that displays user error attempts to log onLastlog: Users who have never logged in################################################BaseName$: Script path and name when executing script################################
Display the user name. This command is equivalent to executing the "id-un" command.SyntaxWhoami [-- help] [-- version]Parameter description: -- Help online help. -- Version: displays the version information.InstanceShow user name# WhoamiRoot
Apacherewrite redirection rules, rewrite regular expressions, second-level domain names point to first-level domain names, multiple domain names point to one domain name, IP to domain name first there is a linux server, there are four IP addresses can point to this server, t
This chapter describes the role transfer between Windows Server 2012 domain controllers and the removal of domain control methods. According to the different application scenarios, the operation methods are summarized and summarized. Here are 2 scenarios:Scenario 1: The primary domain controller and the secondary domain
A recordThe A (Address) record is used to specify the IP address record corresponding to the Host Name (or domain name. You can direct the website server under this domain name to your web server. You can also set a subdomain name for your domain name. In general, a record is the IP address of the server, and a record bound to the
The meaning of the forest root domain in the domain tree, and the meaning of the domain forest root domain
Contoso has many IT resources in the company's IT environment, and these IT resources are all in a state of decentralized management, which virtually increases the management cost of contoso, moreover, the manage
Prevents domain host access from being out of domain control and domain host access from being out of Domain
I. Introduction
When all the company's hosts are added to the domain, SA's primary task is to prevent the hosts in the domain
generally speaking, do not make any special settings, are manually added domain, and the use of the Administrator account, this situation is risky, easy to be remembered password. Therefore, if you can set up a normal user account, specifically to perform the domain operation, it will reduce such risks. In fact, by default, the domain of every ordinary account ca
1. query the IP address of the domain name. Query by using network tools such as ping or ip138.com on the local machine.2. Use the IP address direction query tool to obtain the list of domain names bound to this IP address.Chinese keywords:Domain name Direction QueryOrIP reverse query domain nameKeyword:Reverse IP domain
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.