Installing Ubuntu on a VM of Hyper-V - expanded PDF

Title Installing Ubuntu on a VM of Hyper-V - expanded
Course Operating Systems
Institution William Paterson University
Pages 13
File Size 1.2 MB
File Type PDF
Total Downloads 68
Total Views 173

Summary

how to install ubuntu...


Description

Installing Ubuntu-20.04 on a VM created by Hyper-V Pre-installation steps: 1. Enabling Hyper-V feature in Windows-10 (not supported by “Home version”)  Click the “Start” button, the leftmost icon on Windows tack bar.  Enter “turn windows features on or off” to display the below screen:



Enable Hyper-V by checking the checkbox to the left of “Hyper-V” as shown in the above dialog boxes. Now Hyper-V manager (VMM: virtual machine manage) has been enabled and you can use it to create and manage virtual machines. You may want to pin the icon of “Hyper-V manager” Windows-10 for easy access..

2.

to the taskbar of

You must be the “administrator” of Windows-10.  To find out: Right click the “Start”  “Settings”  “Accounts”  To change: left click the “Start”  “Control Panel”  “Users Accounts”  “Change your account type”; check the radio button to the left of “Administrator” then click “Change Account Type”.

Steps of using Hyper-V manager to create a new virtual machine (a VM): 1. Launch Hyper-V Manager:  Either click the icon or Hyper-V manager (on the task bar or on the desktop)  Or click “Start” and type “hyper-V” followed by clicking the hyper-V manager.

Notice that there is no virtual machine (VM).

2. Right click DESKTOP-L1P7VCC (yours is different) to display the “New Virtual Machine Wizard”

3. Click Next > to display “Specify and Location” dialog box below. Notice that Name has been changed to Ubuntu20.04.3 and Location has be changed to D:\Hyper-v\.

4. Click Next > to display “Specify Generation” dialog box below. Notice that Generation 2 has been selected.

5. Click Next > to display “Assign Memory” dialog box below. Notice that Startup memory has been changed to 2048. Also note that Use dynamic Memory for this virtual machine box has been checked.

6. Click Next > to display “Configure Networking” dialog box below. Notice that the Connection has been changed to from Not Connected to Default Switch.

7. Click Next > to display “Connect Virtual Hard Disk” dialog box below. Check radio button on Create a virtual hard disk that is dynamically expandable and set the Size to 40 GB.

8. Click Next > to display “Installation Options” dialog box below. Notice that the radio button Install an OS from a bootable image file (an iso file downloaded early).

9. Click Next > to display the below “Completing the New Virtual Machine Wizard” dialog box, which shows the configuration information of the new VM just about to be created.

10. Click Finish to create the new VM.

Notice a new VM named uBuntu-20 has been created and appear the middle pane.

Install Ubuntu operating system on the newly created VM: 1. Right click the Name of the virtual machine Ubuntu-20.04.3 (yours may be different). Then click Connect… in the popup menu to display the below screen:

2. Click Start to begin the installation of the Ubuntu OS 3. Take about 10 minutes (depending on the speed of your PC) for a full installation of ubuntu Desktop OS on my PC. After successful installation, click Restart Now to restart the system.

Starting a VM (with uBuntu-21 desktop OS installed): 1.

Launch and display the IDE of Hyper-V manager: You may either a) click the icon (if it appears on the task bar or Windows desktop) or b) left click Windows’ “Start” button, then type Hyper-V… If successful, the Hyper-V Manager is displayed as shown below. Notice that two VMs named ubuntu-20 and ubuntu-21 that I have created earlier appear in the list of “Virtual Machines”.

2.

Start the VM (named ubuntu-20 in this demo): right click on the name of VM ubuntu-20, then click “Start” in the popup menu to change the state of the VM from Of to Running (see the above screen shot):

3. To boot uBuntu OS, double click on the name of the VM (take a minute of less) to display the below left login screen. Click on the the username (e.g., irwinhu, below left) and enter the password (below right):

4. Press Enter to display the banner page of uBuntu Desktop GUI:

Ubuntu basics: a very brief introduction to Ubuntu GUI: A few selected icons, from top to bottom, on the left side of the above uBuntu Desktop banner page are: 1) Firefox: web browser 2) Files: click on it displays the below screen

Right clicking on the folders’ area allows one to do several things including creating new folders, dragging files in a folder and drop them in another, etc.. Notice that I have created a folder name CS2400 and has two files stored in them, as shown below:

3) Ubuntu software: Left click on it displays the below screen:

4) Help: to get online help 5)

(at the bottom): “Show applications”. Upon clicking, the below screen is displayed:

Clicking on “Utilities” displays the above right screen.

How to swich from Ubuntu GUI mode to text mode (also called command mode): 

Simply clicking on the “Show applications” icon at the lower left corner to display the below screen and enter “terminal” in the search box and press “Enter” to display the console or command mode scrren.

The console screen: where you can enter Linux/UNIX command. The line in green color is called a command prompt displayed by Linux/UNIX shell. Shell is an command interpreter; it waits the user to enter command and interprets it. The shell then passes the interpreted command to the Linux/UNIX for execution. After the command is taken care of, the shell displays the same prompt, waiting for the user to enter another command.

The are several shells available for users to choose. The Ubuntu Linux uses Bash shell by default, which is one of the most popular shell on Linux/UNIX operating systems. More on Linux shell later. The below screen shown three frequently Linux commands: ps, date, and sudo …

The first command requests the system to display information about the shell. The second command requests the system to display the date the time the command was issued. The third requests the Linux to install the C++ compiler named g++. Notice that I did not press the Enter key, so the command was not executed because I had earlier run the command and had g++ installed already, but you must run the command to install the compiler!

How to enter, edit compile, execute, and store the source code of a C++ program: 



To enter source code, you need a text editor. Ubuntu provide nano, pico (almost the same as nano), and vi (visual editor). Nano and pico are simple and easily to learn; vi is harder to learn but more sophisticated and widely used by pros. To compile C++ code, you need a good C++ compiler. You can download a very good C++ compiler named g++ by entering sudo apt install g++ then press Enter as described before. You may be interested in learn the history of g++ compiler of part of the GNU compiler collection at https://en.wikipedia.org/wiki/GNU_Compiler_Collection. The below screenshot shows a sequence of Linux/UNIX commands/utilities that

1. 2. 3. 4. 5. 6. 7. 8. 9. 10.

Displays the present working directory (folder): Displays the contents of the folder: Displays the contents of the folder with -F option: Displays the contents of a folder with -l: Removes a.out file from the folder: Displays the contents of a folder again: Compiles hello.cpp source file: Displays the contents of a folder again: Executer or runs the a.out file: Displays the contents of the source file hello.cpp:

pwd ls ls -F ls -l rm a.out ls g++ hello.cpp ls ./a.out cat hello.cpp

Procedure to download software from CS-CIT Department website (Microsoft Azure): 

 

Log onto https://CS-CIT.wpunj.edu Click “Microsoft Azure” Follow screen instructions: 1. Go to or click on the weblink: https://azureforeducation.microsoft.com/devtools. 2. Click on the blue "Sign In" button and enter your WPU email address along with your password. 3. In the “Select a certificate” screen, click “OK”

4. Sign in again by entering your email address and password 5. Another layer of security (passcode or confirm a call to your cellphone) 6. If successful, the Microsoft Azure displays the below screen:

7.

Click Software to display list of available software, e.g., Windows 10 Education N, version 20H2 (updated Nov 2020) “Windows 10 Education builds on Windows 10 Enterprise and provides enterprise-grade manageability and security for schools. Windows 10 Education is effectively a variant of Windows 10 Enterprise that provides education-specific default settings. Windows 10 Education N includes the same functionality as Windows 10 Education, except that it does not include certain media related technologies (Windows Media Player, Camera, Music, TV and Movies), and does not include the Skype app.”

8. Click View Key to display the product key (required during upgrading your Windows from Home edition) E.g., 51YBN-xxxxx-42RSJ-yyyyy-YCRB7 (this is NOT a real product key; don’t use it!!!) 9. Click Download

Useful websites:    

https://www.youtube.com/watch?v=fjzDBEXOSVw Installation steps and more… https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v Enable the Hyper-V role through “Setting” of Windows and more… https://www.youtube.com/watch?v=UBCE-ZH_xLA Ubuntu 20.04 For Windows Users (about 20’) https://www.youtube.com/watch?v=D4WyNjt_hbQ Ubuntu Complete Beginners Guide (about 70’)...


Similar Free PDFs