Question: ### Linux Command Practice Questions 1 . * * Display the current directory. * * 2 . * * Display the current username. * *

### Linux Command Practice Questions1.**Display the current directory.**2.**Display the current username.**3.**Create a directory called Projects.**4.**Without moving from the current directory, create a file called README.md in the Projects directory.**5.**Using one command, create a file called notes.txt and write the following into the file: These are my notes:.**6.**Change to the Projects directory.**7.**Change to the /var directory.**8.**List all files and directories with their detailed information from the /var directory.**9.**Change to the home directory without using a pathname.**10.**Change to the /usr directory without using a pathname.**11.**List all directories, files, and hidden files with all their detailed information from your home directory without using a pathname.**12.**Using the ~ symbol, create the following directories in your home directory in one command: dirA and dirB/dirC. dirC is a subdirectory of dirB.**13.**Using the adduser command, create a user john with the full name John Doe and password j1234, leaving other parameters empty.**14.**Using the adduser command, create a user jane with the full name Jane Smith and password j4321, leaving other parameters empty.**15.**Display the last 4 users information from the /etc/passwd file.**16.**Display the first 4 groups information from the /etc/group file.**17.**Display the last 2 users information from the /etc/shadow file.**18.**Copy the notes.txt file and the Projects directory from your home directory into Johns home directory without using the homes pathname.**19.**Delete the notes.txt file from Johns directory.**20.**Change Johns other parameter to engineering and Work phone parameter to 0987654321 using one command.**21.**Switch to the root user.**22.**As the root user, change the password of user jane to securepass.**23.**Add user jane to Johns group.**24.**Add user jane to the sudo group.**25.**Switch to user jane and change to Janes home directory without using the home pathname.**26.**List all files and directories (including hidden files) from Johns home directory without using the home pathname.**27.**Change user jane home directory to Johns home directory.**28.**Switch to YOUR USER account.**29.**Change to your home directory.**30.**Enter the command history >> history to populate the file.**31.**Rename the history file to your student number.**### Advanced Questions1.**Create a script that automates the creation of a user, assigns them to a group, and sets a password.**2.**Write a command to find and display all files larger than 100MB in the /var directory.**3.**Create a cron job that backs up the /home directory to /backup every day at midnight.**4.**Write a command to display the 10 most recently modified files in the /etc directory.**5.**Create a symbolic link to the /usr/local/bin directory in your home directory.**6.**Write a command to search for the string error in all log files in the /var/log directory and display the results.**7.**Create a script that monitors disk usage and sends an email alert if usage exceeds 80%.**8.**Write a command to list all installed packages on the system and save the output to a file called packages_list.txt.**9.**Create a script that checks if a specific service (e.g., nginx) is running and restarts it if it is not.**10.**Write a command to display the IP addresses of all network interfaces on the system.**---

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!