Os Exp2
Os Exp2
Command used:
1. uname -o
2. logname
3. uname –n
Explanation:
Output:
Q2. Find out the users who are currently logged in and find the particular user too.
Command used:
1. whoami
2. finger username
Explanation:
1. The whoami command shows the current user's login name.
The who command lists all users who are currently logged in, along with their
login details, such as the terminal and login time.
Output:
Command used:
1. cal 01 2000
2. cal 02 1999
3. cal 07 2000
cal 08 2000
cal 09 2000
4. cal
5. date "+%a %b %Y"
Explanation:
The cal command displays the current calendar month and day.
Output:
Explanation:
The echo Home command used to display home directory.
Output:
Explanation:
The mkdir SAMPLE_NAME command used to make a new directory with
SAMPLE_NAME .
Output:
Q9. Create a Sub-directory by name TRIAL_NAME under SAMPLE_NAME.
Command used:
mkdir directory_name
Explanation:
The cd command used to change directory to SAMPLE_NAME and then mkdir
TRIAL_NAME command used to make a new directory with TRIAl_NAME
under SAMPLE_NAME .
Output:
Q12. Change from home directory to TRAIL_NAME by using absolute and relative
pathname.
Command used: cd /home/username/TRIAL_NAME or cd directory_name
Explanation: The cd command used to change directory to SAMPLE_NAME or we can
give absolute path instead of name.