惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
C
Cisco Blogs
Help Net Security
Help Net Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Scott Helme
Scott Helme
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
M
MIT News - Artificial intelligence
L
LINUX DO - 热门话题
I
InfoQ
GbyAI
GbyAI
NISL@THU
NISL@THU
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Engineering at Meta
Engineering at Meta
H
Hackread – Cybersecurity News, Data Breaches, AI and More
TaoSecurity Blog
TaoSecurity Blog
Simon Willison's Weblog
Simon Willison's Weblog
A
About on SuperTechFans
Spread Privacy
Spread Privacy
月光博客
月光博客
W
WeLiveSecurity
AWS News Blog
AWS News Blog
云风的 BLOG
云风的 BLOG
有赞技术团队
有赞技术团队
Security Latest
Security Latest
人人都是产品经理
人人都是产品经理
PCI Perspectives
PCI Perspectives
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Microsoft Azure Blog
Microsoft Azure Blog
Hugging Face - Blog
Hugging Face - Blog
S
SegmentFault 最新的问题
T
Troy Hunt's Blog
Martin Fowler
Martin Fowler
The Hacker News
The Hacker News
T
Tor Project blog
C
CERT Recently Published Vulnerability Notes
Apple Machine Learning Research
Apple Machine Learning Research
Stack Overflow Blog
Stack Overflow Blog
K
Kaspersky official blog
Cloudbric
Cloudbric
H
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tailwind CSS Blog
D
DataBreaches.Net
Security Archives - TechRepublic
Security Archives - TechRepublic
T
Tenable Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
博客园 - Franky
L
LINUX DO - 最新话题
MyScale Blog
MyScale Blog

博客园 - Shark Xu

我的英雄梦和家国情怀——写于2021年国庆前夕 幻方算法 自己制作的粉碎机批处理程序 Ubuntu 16.10 server 相关 android sdk manager 假如不能从官方下载或者很慢,可以参照下面的网址 HttpModule生命周期示意图 Windows 2012 安装 .net framework 3.5 在Windows 2008/2008 R2 上配置IIS 7.0/7.5 故障转移集群 11G RAC 中 OCR 及Voting Disk 相关操作 RHEL 6 或者 Oracle Linux 6, 不关机识别新添加的scsi硬盘 在Window下安装Oracle 12C Cloud Control Agent 如何修改 EM12c 中 SYSMAN 用户的密码? 在Oracle Linux Server release 6.4下配置ocfs2文件系统 手动升级11.2.0.1的rac数据库到11.2.0.4 oracle 11G rac 11.2.0.1 打补丁9413827 oracle 11g 使用物化视图远程增量刷新数据 ORACLE 11.2.0.4 OCR VOTING DISK 模拟恢复场景 Oracle Enterprise Linux 6.4 下配置vncserver Oracle Enterprise Linux 6.4 下挂载ISCSI 设备
whoami 和 Who am i
Shark Xu · 2014-03-13 · via 博客园 - Shark Xu

① 两个命令在一般的情况下,似乎效果是一样的

② 但是当你执行完su 命令切换用户后,就不一样了,who am i 显示最早login的账户,而whoami 显示切换后的账户

    例如:

    -bash-3.2# who
root       console      Mar 13 14:54    (:0)
root       pts/3        Mar 13 14:57    (:0.0)
root       pts/4        Mar 13 15:26    (:0.0)
root       pts/5        Mar 13 16:59    (solaris2)
root       pts/6        Mar 13 17:07    (192.168.202.1)
-bash-3.2# who am i
root       pts/6        Mar 13 17:07    (192.168.202.1)
-bash-3.2# /usr/ucb/whoami
root

以上部分,两个命令执行的结果是一样的。

-bash-3.2# su - oracle
Oracle Corporation      SunOS 5.10      Generic Patch   January 2005
-bash-3.2$ who am i
root       pts/6        Mar 13 17:07    (192.168.202.1)
-bash-3.2$ /usr/ucb/whoami   (这是Solaris10下的,linux下缺省path下能找到该命令)
oracle