Sie sind auf Seite 1von 22

171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera

If you want to install Ubuntu from the USB flash Disk, change the boot sequence
according to the USB mass storage to boot first.Press Enter to get a language
screen and then select the language of your choice.

For installing the Ubuntu 16.04, Select Install Ubuntu.

You can either choose to install updates and other third-party software while installing
Ubuntu 16.04 or leave as it is since it requires internet and installation may take an hour-long
depends on the downloadable contents.

Next is the installation type, this installation on the fresh HDD so I have only two
option in the installation type. Depend on the other OS on your HDD you will get
more options. Please chose any one of the methods.
171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera

1. Erase disk and install Ubuntu (i.e. it will format the entire drive and install the
OS). If you don’t have any idea about the partitioning scheme simply click on Install
Now.

Something else (i.e. you can manually create the partition and install Ubuntu on
your selected partition), use this advanced mode if you are comfortable in
partitioning your drives manually. Click on continue.nce you clicked, you would get
the following page where installer lists available hard disk. In my case I have one
hard disk size of 100GB, to create a partition; click on New Partition Table to create
an empty partition.

Since this is a new hard disk. Pop up will ask you to confirm, click on continue.

Partition scheme will be like below:

/boot – 500MB ,swap – 2048MB, Remaining (99GB)


171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera

In the final screen of the installation wizard, you will be prompted to enter information
about the user that you wanted to create on the system. Enter your information in
this screen.

Here is one thing you should remember – if you select ‘Login


automatically‘,System will directly take you to desktop without asking your
credentials.

It’s best if you give a very secure password for your installation. Ubuntu will tell you
whether your password is secure or not.

If you select ‘Encrypt my home folder‘ it will make all the files and folders in your
home folder more secure from unauthorized viewing if you have multiple users using
your computer. When you log into your computer your files are seamlessly decrypted
for just your session. If you are not sure, leave this box unchecked.

Once it’s done, click on continue.

Once your machine is restarted, you will get a


login window. Login with username and password that you created earlier.
171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera
171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera

Program-2
Execute basic commands in Linux Terminal
1.pwd
This command givs the absolute path from root to current directory.

2. ls
This command gives the list of files that are present in your current directory.

Extending ‘ls’ :

 ls –a
This command is used to display all files including hidden file in the current
directory.

 ls –al
This command is used display list of all files including hidden files with the access
provided to them by root.
171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera

 ls –lrt
This command displays list of all files in current directory in long format, arranged
with respect to its modification time.

 ls –lrs
This command is used to display the list of all files arranged with respect to their size.

 ls –R
This command is used to display the hierarchal list of all files in current directory.
171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera

3. cd
This command helps in navigating between directories.

4. mkdir
This command is used to create a directory or a file.

5. rmdir
This command is used to remove/delete a directory or a file.
171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera

Step 1: Click on my computer and then go to C (Local Disk C:) folder.

Step 2: Click on program files and then go to java folder.

Step 3:In java folder,open jdk and then open bin and from the top copy the url of the location of JDK
folder.

Step 4:After this,go to my computer and click


on advanced system settings.
171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera

Step 5: Click on Environment Variables and then click on path.

Step 6: Click on new and then paste the copied url of jdk’s location.
171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera

Step 7: Then click ok and close that window.

Step 8: Open Command prompt and type “javac” there.

Step 9: If you see a huge list of things being displayed on the screen,then your java path is set and
good to go.
171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera

class Hello

public static void main(String[]args)

System.out.println("Hello World");

}
171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera
171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera

class Add

public static void main(String[]args)

int a=15,b=20,c;

c= a+b;

System.out.println("Sum is " +c);

}
171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera
171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera

class Diff

public static void main(String[]args)

int a=25,b=20,c;

c= a-b;

System.out.println("Difference is " +c);

}
171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera
171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera

classMult

public static void main(String[]args)

int a=25,b=20,c;

c= a*b;

System.out.println("Product is " +c);

}
171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera
171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera

class Divide

public static void main(String[]args)

int a=200,b=20,c;

c= a/b;

System.out.println("Division is " +c);

}
171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera
171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera

classAllinone

public static void main(String[]args)

int a=200,b=20,c,d,e,f;

c= a/b;

d=a+b;

e=a-b;

f=a*b;

System.out.println("Division is " +c);

System.out.println("Addition is " +d);

System.out.println("Difference is " +e);

System.out.println("Multiplication is "+f);

}
171302052 BTECH CSE 4th Semester Group - 2 Vakul Vadhera