76.4k views
0 votes
Using the Terminal on your CentOS operating system (on your Virtual Machine)

complete the following tasks. Please provide screenshots for each step. Please use the Terminal to do
every task and not the graphical user interface.
1) Login as the user ‘alice’, with the provided username and password. Change directory to
/home/alice/Downloads and create a text file named ‘mytextfile.txt’. Explain what software you
use to create the text file.
2) Use the command to check the ownership and permissions of the file you have just created
(‘mytextfile.txt’).
3) Now, without using the graphical user interface, log in as root. Navigate to the location of the
file ‘mytextfile.txt’.
4) Change the ownership of the file ‘mytextfile.txt’ to ‘bob’.
5) Allow bob and default group of the file to read, write and execute, and everyone else the read
permissions. Provide a screenshot of each step.
6) check the permission/ownership details of the file again.

1 Answer

2 votes

Final answer:

The question requires logging in as a user and root, creating a text file, checking and changing its permissions, and taking screenshots from the CentOS Terminal.

Step-by-step explanation:

The question involves performing several operations within a terminal of a CentOS operating system. The tasks include logging in as a user, file creation, checking permissions, changing ownership and permissions of a file using command line interface (CLI), specifically on Virtual Machine's terminal.Steps for the task:Login as 'alice' using the command 'su - alice', then access the Downloads directory with 'cd /home/alice/Downloads'. Create a text file using 'touch mytextfile.txt' or 'vim mytextfile.txt' if adding contentimmediately.To check the file's permissions and ownership, use the command 'ls -l mytextfile.txt'

.Login as root from the current user with 'su -' and navigate to the file's location.To change the file's ownership to 'bob', execute the command 'chown bob mytextfile.txt'.Set the required permissions using 'chmod 774 mytextfile.txt', allowing owner and group full permissions, and others read-only access.Verify the changes with 'ls -l mytextfile.txt' again.Screenshots for each step are requested, which cannot be provided here. You will need to perform these steps and take screenshots using tools such as gnome-screenshot, ksnapshot, or any other screen capture tool available on your CentOS system.

User Brogan
by
8.2k points