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
- click control panel
- click backup or restore your files
- click set up backup displaying at the side of your console and follow the wizard
STEP 2:-Disk Partition
- Click Windows key +X and press disk management
- select the disk you want to partition
- right click on it and select shrink volume
- If you have 500 Gb harddisk then partition around 60 Gb for ubuntu
It will create a free space.
- Then make your pendrive bootable and insert it to usb port.
- Shut down your computer
- Start your computer and press corresponding function key of Bootup settings.
Click on USB drive option
STEP 3 :- Install OS
Click on install Ubuntu, then it will show..
Click on something else option…
Select the FREE SPACE option created by you. AND, click on + sign shown at th bottom.
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.
STEP 4:- Change Boot Device
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
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…..
NOW,THE Next Part……………
HOW TO RUN A C++ PROGRAM ON UBUNTU THROUGH CLI(COMMAND LINE INTERFACE i.e TERMINAL
$tep 1: Go to TERMINAL
make a directory let named ,test and then change the directory using commands
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.
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…
TERMINAL is CASE-SENSITIVE…
there is a command, clear used to clear the terminal