DevOps Assignment -1
1 -Write commands to:
- Create a directory named "LinuxPractice".
- Navigate into the "LinuxPractice" directory.
- Create a file named "sample.txt" inside the directory.
- Display the contents of "sample.txt" using a command.
- Rename "sample.txt" to "new_sample.txt".
- Delete "new_sample.txt".
Provide screenshots or a recording of the terminal session executing these commands.
2- File System Navigation:
- Use the command line to:
- Navigate to the root directory.
- List the contents of the root directory.
- Navigate to the "etc" directory.
- Display the contents of a file named "hostname".
- Return to the home directory.
Describe the purpose of the "hostname" file and its location within the file system.
3-File Permissions and Ownership:
- Create a new directory named "PermissionsTest".
- Set the permissions of "PermissionsTest" to allow read, write, and execute access for the owner,
and read-only access for group and others.
- Create a file named "secret.txt" inside "PermissionsTest".
- Change the ownership of "secret.txt" to a different user.
- Provide the command sequences used to accomplish these tasks.
4- File System Hierarchy:
- Research and create a diagram illustrating the Linux file system hierarchy.
- Label key directories and describe their purposes.
- Provide explanations for the significance of directories such as "/bin", "/etc", "/home", "/var",
and "/proc".
Questionnaire
1 - What command is used to create a new directory in Linux?
2- How do you navigate to the parent directory using the command line?
3- Explain the difference between absolute and relative paths.
4- What command is used to display the permissions of files and directories in Linux?
5- Describe the purpose of the "/etc" directory in the Linux file system.
6- What is the significance of the "/proc" directory, and what type of information does it contain?
7- How do you change file permissions in Linux using the command line?
8- What command is used to list the contents of a directory in Linux?
9- Explain the concept of symbolic links in Linux and provide an example of their usage.
10- Describe the role of the "/var" directory in the Linux file system hierarchy.
Preapared By – K.DR