automated terminal push
All checks were successful
code.softwareshinobi.com-learn/docker.softwareshinobi.com/pipeline/head This commit looks good
All checks were successful
code.softwareshinobi.com-learn/docker.softwareshinobi.com/pipeline/head This commit looks good
This commit is contained in:
58
docs/Linux-Commands/Users-And-Groups/027-the-whoami-command.md
Executable file
58
docs/Linux-Commands/Users-And-Groups/027-the-whoami-command.md
Executable file
@@ -0,0 +1,58 @@
|
||||
# The `whoami` command
|
||||
---
|
||||
The `whoami` command displays the username of the current effective user. In other words it just prints the username of the currently logged-in user when executed.
|
||||
|
||||
To display your effective user id just type `whoami` in your terminal:
|
||||
|
||||
```
|
||||
manish@godsmack:~$ whoami
|
||||
# Output:
|
||||
manish
|
||||
```
|
||||
|
||||
Syntax:
|
||||
|
||||
```
|
||||
whoami [-OPTION]
|
||||
```
|
||||
|
||||
There are only two options which can be passed to it :
|
||||
|
||||
`--help`: Used to display the help and exit
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
whoami --help
|
||||
```
|
||||
|
||||
Output:
|
||||
|
||||
```
|
||||
Usage: whoami [OPTION]...
|
||||
Print the user name associated with the current effective user ID.
|
||||
Same as id -un.
|
||||
|
||||
--help display this help and exit
|
||||
--version output version information and exit
|
||||
```
|
||||
|
||||
`--version`: Output version information and exit
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
whoami --version
|
||||
```
|
||||
|
||||
Output:
|
||||
|
||||
```
|
||||
whoami (GNU coreutils) 8.32
|
||||
Copyright (C) 2020 Free Software Foundation, Inc.
|
||||
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
|
||||
Written by Richard Mlynarik.
|
||||
```
|
||||
Reference in New Issue
Block a user