How can any user find out all information about a specific user like his default shell, real-life name, default directory, when and how long he has been using the system?



How can any user find out all information about a specific user like his default shell, real-life na..

Answer / Suhail Abbas

To find out details of a specific user in Linux, you can use the following commands:
1. User Information: `id <username>`
2. Home Directory: `echo $HOME` or `ls -ld /home/<username>`
3. Login Shell: `grep '<username>' /etc/passwd`
4. Account Creation Date & Last Login Time: `last <username>`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Shell Script Interview Questions

How to sort a result of Ls -l command based on columns. Ex. i want to sort 5th column from output of ls -l command.

6 Answers   TCS,


How do I open a jshell in cmd?

1 Answers  


write a program to display all the files from the current directory which are created in particular month

6 Answers  


What are the Different types of shells?

5 Answers  


Is shell scripting easy to learn?

1 Answers  


How to write an Auto scripting for deleting old files using shell script and made a cron job to run on daily basis

1 Answers  


Print a given number, in reverse order using a shell script such that the input is provided using command line argument only.

1 Answers  


how to read systems current date and time

4 Answers  


What is bourne shell scripting?

1 Answers  


Write down the syntax of "for " loop

1 Answers  


What are environment variables?

2 Answers  


What does path stand for?

1 Answers  


Categories