Task 1

Task 1

 

How to Dual boot Windows 7 and Ubuntu 14.04 and run c++ program in ubuntu

STEP   1 :-If windows is already installed on your PC then take backup of  your windows by

  1. click control panel
  2. click backup or restore your files
  3. click set up backup displaying at the side of your console and follow the wizard

1

STEP 2:-Disk  Partition

  1. Click Windows key +X and press disk management
  2. select the disk you want to partition
  3. right click on it and select shrink volume
  4. If you have 500 Gb harddisk then partition  around 60 Gb for ubuntu

2

It will create a free space.

  1. Then make your pendrive bootable and insert it to usb port.
  2. Shut down your computer
  3. Start  your computer and press corresponding function key of Bootup settings.

Click on USB drive option

3.jpg

STEP 3 :- Install OS

4.jpg

Click on install Ubuntu, then it will show..

5

Click on something else option…

6

Select the FREE SPACE option created by you. AND, click on + sign shown at th bottom.

7

8

Ext4 journaling file system is for LINUX  as  ntfs is for WINDOWS.Its for storing, retrieving data. Adjust size of your choice, or don’t change it.

On Mount point ,Select /

Then, go ahead. Enter your name, password etc. on the next screen complete some simple steps and finally click install.

Ubuntu-on-VirtualBox-16

10

STEP 4:- Change Boot Device

11

Set your BIOS boot order such that once again the hard drive is the primary boot device.

Restart your system and again go to BOOT SETUP as you did in step 3 and now select hard drive.
Note that if you skip this step, your system will try to load an operating system from removable media before looking for Windows. If there is not a disk in the drive, it should proceed to boot into Windows.

Step 6: Reboot and Configure

13

You will now see a choice between Windows and Ubuntu Linux. Go ahead and select Linux, and get yourself familiarized with this great OS.

WELCOME TO THE WORLD OF UBUNTU…..

14

 

NOW,THE Next Part……………

HOW TO RUN A C++ PROGRAM ON UBUNTU THROUGH CLI(COMMAND LINE INTERFACE i.e TERMINAL

Screenshot from 2016-02-01 16:35:27

$tep 1: Go to TERMINAL

make a directory let named ,test and then change the directory using commands

mkdir test

cd test

then, go to GEDIT OR VIM …these are the text editors for ubuntu there are
many more also..

you can install these via net or through UBUNTU SOFTWARE CENTER
furthur, write a c++ program in gedit and save it in test.

$tep 2: I AM HERE SHOWING A PROGRAM TO FIND FACTORIAL OF A NO.

Screenshot from 2016-02-07 18:48:55

here, ls command is for seeing list of programs in a particular selected directory…

.cpp is the extension on c++ file…….. I HAD SAVED THE PROGRAM BY NAME fact.cpp

g++ fact.cpp is for compilation

./a.out is for executing the program

…… YOU CAN RUN ANY OF your c++ program in this way, there is another example i m showing you here…

Screenshot from 2016-02-07 18:59:33

NOTE:

TERMINAL is CASE-SENSITIVE…

there is a command, clear used to clear the terminal

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s