- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- "who am i -R" HP-UX command in Linux
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2021 03:19 AM - last edited on 12-15-2021 08:36 PM by support_s
12-15-2021 03:19 AM - last edited on 12-15-2021 08:36 PM by support_s
"who am i -R" HP-UX command in Linux
Hi,
Does anyone know the equivalent of the HP-UX "who am i -R" command in Linux?
The option -R in HP-UX:
-R Displays the user's host name. If the user is logged in on a tty, who displays the string returned from gethostname() (see gethostname(2)). If the user is not logged in on a tty and the host name stored in the utmps database or named utmp like file has not been truncated when stored (meaning that the entire host name was stored with no loss of information), it is displayed as it was stored. Otherwise, the gethostbyaddr() (IPv4) or getipnodebyaddr() (IPv6) function is called with the internet address of the host (see gethostent(3N)). The host name returned by gethostbyaddr() (IPv4) or getipnodebyaddr() (IPv6) is displayed unless it returns an error, in which case the truncated host name is displayed.
But on Linux I can't find any equivalent parameter.
Thanks!!!
- Tags:
- Operating System
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2021 08:13 AM
12-15-2021 08:13 AM
Re: "who am i -R" HP-UX command in Linux
> [...] in Linux?
"Linux"? _Which_ "Linux"? Possibly more relevant/appropriate:
https://community.hpe.com/t5/Linux-General/bd-p/itrc-15
> [...] Displays the user's host name. [...]
If you want the host name, what's wrong with "hostname"?
man hostname
On a system which has multiple network interfaces, each one might
have a different (DNS) name. Is there some actual problem which you are
trying to solve?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2021 06:23 PM
12-18-2021 06:23 PM
Re: "who am i -R" HP-UX command in Linux
"who am i -u" shows the hosname from where the user is logged in. It works same way in HP-UX and Linux.
Regards
Manish