Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

please help Install another Linux VM of a different flavor on you host machine.

ID: 3747596 • Letter: P

Question

please help

Install another Linux VM of a different flavor on you host machine. You can choose Fedora, Ubuntu, Mandriva, etc.

Install emacs and vim on your Mint VM

B. Unix/Linux Commands

(write down the command you used for each step)

Make a new directory in your home directory called hw1d1 and copy the file /etc/passwd to it

Change the current directory to the one that you just made

Copy the file passwd to another file called passwd2.

Provide the number of lines, words, and characters in that file.

Provide number of files in the directory.

Copy /etc/group to your new directory made in step 1.

Find the groups you are a member of and put the contents into a file called grps_i_am_member.txt.

List all files that end with a .txt.

List files with an “i” in their name.

Make a directory in the current one called dept2.

Determine the access permission of the /tmp directory.

Make a directory in the /tmp directory called removeme.

Make a sub directory in the directory created in step 1 and call it hw1d1s1.

Move the file passwd2 into hw1d1s1.

Change the directory to the one made in the previous step.

Give a list of only the user names that are in the passwd2 file.

Help for the echo command.

Write a command using echo that puts the string “This is cool !” into a file called cool.txt.

Remove the subdirectory hw1d1s1 and all of its contents using a one line command given that you are currently in that directory.

Explanation / Answer

Install another Linux VM of a different flavor on you host machine:

1. Install VirtualBox:VirtualBox is a free program provided by Oracle. This is the software that powers the entire virtualization process, so go ahead and download it here if you haven’t already and then install it.

2. Download Linux Flavor :Download the installation file. You should end up with an ISO file in your Downloads folder.

3. Open VirtualBox, click New, and use the following steps as a guide:
Name and operating system. Give the VM a name, choose Linux from the Type dropdown, and select the Linux version as indicated. Go with Other Linux if your distribution isn’t listed.
Memory size. Select the memory size. This will siphon RAM from your system for the VM, so don’t overdo it. This number can be changed easily later under the VM settings menu.
Hard drive. Since we’re starting fresh, leave it on the default Create a virtual hard drive now.
Hard drive file type. There are multiple choices here for advanced users. Choose VDI for now unless you know you will need one of the other options.
Storage on physical hard drive. Based on your decision earlier, select either Dynamically allocated for an expandable drive file or Fixed size for a static drive file. As the description states, please note that a dynamic drive file will expand as needed, but will not shrink again automatically when space on it is freed.
File location and size. Since you’re making a virtual hard drive within your existing file space, you can give this file a name and choose where it is stored. Adjust the slider or type in a specific number in the box to the right to specify the virtual hard drive size.
In VirtualBox, you should now see that there is an item on the left-hand side listing your name from step 1 followed by Powered Off. Let’s go ahead and get it powered on

4.We’ve set the stage for the new guest operating system, but it still needs to be installed. Select your new VM on the left and click Start at the top.The next window will prompt you to select a start-up disk for the VM. Click on the icon next to the dropdown to open a file explorer window, then track down the Linux ISO you downloaded earlier.Once you have selected the file, click Start. This will take you to the boot-up options for the OS, and from here you can simply follow the prompts. Many Linux distributions will give you the option to try the software or outright install it – keep in mind that you have set up a virtual disk drive for this VM and you will not be affecting your files on the host machine by installing the new OS.Once the installation is complete, you’re all set!

Install emacs and vim on your Mint VM:

emacs:

Remove previous Emacs if any before getting started:

1. Open terminal (Ctrl+Alt+T) and run command to install build tools:
sudo apt install build-essential checkinstall (Type in your password when it asks and hit Enter)
2. Then install the build dependencies via command:
sudo apt-get build-dep emacs24
3.Download the source at ftp.gnu.org/gnu/emacs/, then extract:
4.Open terminal and navigate to the “emacs-25.1” folder via command
cd ~/Downloads/emacs-25.1
5. In the same terminal window, once you’re in the source folder, run the commands below one by one:
./configure
make
6. Finally use checkinstall command to create .deb and install Emacs 25.1:
sudo checkinstall

vim:

1.Remove vim-tiny which is the default installation package.
$ sudo apt remove -y vim-tiny
2.Update package list.
$ sudo apt update
3.Install the full version of Vim.
$ sudo apt install -y vim
4.Verify package is successfully installed and view the list of enabled features.
$ vi --version

Make a new directory in your home directory called hw1d1 and copy the file /etc/passwd to it

$ cd home directory(GIve directory name)

$ mk dir hw1d1 (To create new directory)

$ cp /etc/passwd /hw1d1

Change the current directory to the one that you just made:

$ cd /hw1d1

Copy the file passwd to another file called passwd2

$ cp passwd passwd2

Provide the number of lines, words, and characters in that file

wc -l : Prints the number of lines in a file.
wc -w : prints the number of words in a file.
wc -m : prints the count of characters from a file.

Provide number of files in the directory

$ ls | wc -l

Copy /etc/group to your new directory made in step 1

cp /etc/group /hw1d1

Find the groups you are a member of and put the contents into a file called grps_i_am_member.txt

$ groups> grps_i_am_member.txt

List all files that end with a .txt.

$ ls *.txt

List files with an “i” in their name

$ find . -type f | grep "i" *

Make a directory in the current one called dept2

$ mkdir dept2

Determine the access permission of the /tmp directory

$ ls-ld /tmp

Make a directory in the /tmp directory called removeme

$ cd /tmp

$ mkdir removeme

Make a sub directory in the directory created in step 1 and call it hw1d1s1

$ cd /hw1d1 mkdir hw1d1s1

Move the file passwd2 into hw1d1s1

$ mv /passwd2 /hw1d1s1 (give the full path of file. Get full path of file by using dir filename)

Change the directory to the one made in the previous step

$ cd givenNameOf previous one

Give a list of only the user names that are in the passwd2 file

Help for the echo command

$ echo --help

Write a command using echo that puts the string “This is cool !” into a file called cool.txt

$ echo "This is cool !" >> cool.txt

Remove the subdirectory hw1d1s1 and all of its contents using a one line command given that you are currently in that directory

$ rm -r hw1d1s1