Question: ### Linux Command Practice Questions 1 . * * Display the current directory. * * 2 . * * Display the current username. * *
### Linux Command Practice QuestionsDisplay the current directory.Display the current username.Create a directory called Projects.Without moving from the current directory, create a file called README.md in the Projects directory.Using one command, create a file called notes.txt and write the following into the file: These are my notes:.Change to the Projects directory.Change to the var directory.List all files and directories with their detailed information from the var directory.Change to the home directory without using a pathname.Change to the usr directory without using a pathname.List all directories, files, and hidden files with all their detailed information from your home directory without using a pathname.Using the ~ symbol, create the following directories in your home directory in one command: dirA and dirBdirC dirC is a subdirectory of dirB.Using the adduser command, create a user john with the full name John Doe and password j leaving other parameters empty.Using the adduser command, create a user jane with the full name Jane Smith and password j leaving other parameters empty.Display the last users information from the etcpasswd file.Display the first groups information from the etcgroup file.Display the last users information from the etcshadow file.Copy the notes.txt file and the Projects directory from your home directory into Johns home directory without using the homes pathname.Delete the notes.txt file from Johns directory.Change Johns other parameter to engineering and Work phone parameter to using one command.Switch to the root user.As the root user, change the password of user jane to securepassAdd user jane to Johns group.Add user jane to the sudo group.Switch to user jane and change to Janes home directory without using the home pathname.List all files and directories including hidden files from Johns home directory without using the home pathname.Change user jane home directory to Johns home directory.Switch to YOUR USER account.Change to your home directory.Enter the command history history to populate the file.Rename the history file to your student number.### Advanced QuestionsCreate a script that automates the creation of a user, assigns them to a group, and sets a password.Write a command to find and display all files larger than MB in the var directory.Create a cron job that backs up the home directory to backup every day at midnight.Write a command to display the most recently modified files in the etc directory.Create a symbolic link to the usrlocalbin directory in your home directory.Write a command to search for the string error in all log files in the varlog directory and display the results.Create a script that monitors disk usage and sends an email alert if usage exceeds Write a command to list all installed packages on the system and save the output to a file called packageslist.txtCreate a script that checks if a specific service eg nginx is running and restarts it if it is not.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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
