Untitled

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

1. Log into the Linux network. Move to and verify you are at your home directory.

What is the
command(s) to verify you are in your home directory?

2. Create five directories name them: Bob, Dennis, John, Sue and Mary.

1. What is the command(s) to do this?

3. Move to the John directory.

1. What is the command(s) to do this?


4. How can you get help in Linux?

1.What are the command(s) for this?.

5. Create two sub directories under the John directory.

1. Name them nut and bolt.

2. What is the command(s) to do this?


6. Create a text file call file1.txt, with the text "This is my first text file, so exciting!".

1. What is the command(s) to do this?

7. Display the contents of file1.txt.

1. What is the command(s) to do this?


8. Copy file1.txt to the bolt directory.

1. What is the command(s) to do this?


9. Display the file permissions of the file1.txt file.

1. What is the command to do this?

10. Change the file permissions to read only for Owner, Groups and Other on the file1.txt.

1. What is the command to do this?


11. How can you verify that these permissions changed on file1.txt

12. Display the contents of the shadow file in the etc directory

1. What is the command(s) to do this?

2. What is the meaning of the different fields in the shadow file?


Meaning of different fields in the shadow file:

Username: The name of the user's account.

The encrypted password is the password.

Last time the password was changed: the date of the last time the password was changed.

Minimum password age is the number of days a password must be used for before it can be changed.

Maximum password age: The most days a password can be used before it needs to be changed.

Password warning period: the number of days before the password expires that the user is warned.

Password inactivity period: The number of days after the password expires that the account is disabled.

Account expiration date: The date when the account will stop working.

13. Display the contents of the passwd file in the etc directory

1. What is the command(s) to do this?

2. What is the meaning of the different fields in the passwd file?


Username: the user account name.

Password: an x indicates the encrypted password is stored in the /etc/shadow file.

User ID (UID): a unique number assigned to the user.

Group ID (GID): the primary group ID of the user.

User information: a short description of the user (usually optional).

Home directory: the user's home directory.

Shell: the default shell for the user.

14. What does the WGET command do?

The WGET command is a program that can be used to get files from the internet. It works with HTTP,
HTTPS, and FTP protocols and can be used in scripts or on the command line.

15. Explain the difference between relative and absolute path statements.

The difference between relative and absolute path statements

Relative path: A path that starts in the current directory and goes somewhere else. It doesn't start
with /, which means "root." ./subdirectory/file.txt is an example.

Absolute path: A path that starts with the root directory (/) and gives the full path to the file or
directory. /home/user/subdirectory/file.txt is an example.

You might also like