Linux Commands For Lab Practice
Linux Commands For Lab Practice
7. who by this command you can see the user name and their ip addresses
Who have logged in on your server?
8. whoami this command shows your current logged in terminal user name
9. who am i this command shows you the logged in terminal number and user
name and more detailed information
Syntax:[root@nettech root]#who am i
11. su username to switch from one user to another users home directory
Syntax: [root@nettech root]#su mango
output will be
[mango@nettech root]#cd
[mango@nettech mango]#
12.su - username to switch from one user to another user users home
directory directly
Example:
[root@nettech /]#ls -l
output
drwxrw-rw- 2 root root 4096 Mar 11 12:03 abcd
(permission) (own) (group own)(size) (name)
[root@nettech root]#chown tarun /abcd
In this example /abcd directory owner will be change to tarun user
effect
[root@nettech /]#ls -l
drwxrw-rw- 2 tarun root 4096 Mar 11 12:03 abcd