For in-class tasks, you are required to execute the commands as instructed and capture the command history upon completion. To ensure that only the commands executed during the current session are captured, it’s recommended to start each session with a clean history. Use the following command to clear the command history stored in the current session.
# Clear the current session's history
history -c- Create two new users: user1 & user2
- Change password for user2.
- Delete user1.
- Create a group named bit23_1
- Add user2 to the group bit23_1
- Create two more groups named bit23_2 and bit23_3
- Discuss with your class mate about sudo and root user.
- Add user2 to groups: bit23_2 and bit23_3
- View what groups user2 belongs to
- Remove user2 from the group bit23_3
- Delete the group bit23_3
- Display the list of users on your system.
- Display the list of groups on your system.
- Give sudo privileges to user2.
- Find out what groups, your current user account belongs to.
- When a new user is created, it also creates home directory for that user. What command would you use to delete user along with its home directory?
- Write the command to update the package database.
- Once you have updated the package database, what command you can use to upgrade the installed packages.
- Install vim using apt-get.
- Delete a package ‘vim’ using apt-get.
- What does this command do “sudo apt-get purge vim”?
- What option flag you can use to simulate an installation of an application?
- You only want to download a package but will install it sometimes later. Run the command in the terminal.
- Execute the command to search a mp3 converting package.
- Execute the command to show the package information of a nano (text editor) package.
- How is apt-purge different from apt-remove?
- It is possible to install a specific version of an application. Install MySQL Version 8.0 (server). (Hint: use search to find the accurate package name)
- Execute the command to get help for date command.
- Display the manual for the command LS.
After you have done all the above tasks, you will run the following command and create firstName_lastNameT2.txt file in your home directory.
history >firstName_lastNameT2.txt
echo "User: $(whoami), Date and Time: $(date)" >> firstName_lastNameT2.txtType explorer.exe . in your terminal and you will see the file firstname_lastname_T2.txt
Now drag that file to your repository for third portfolio.
Note: Always, check the contet of the file created to verify it includes every commands that you have executed.