This document provides a tutorial on using Java and essential Linux commands. It discusses using javac and java to check installation, creating folders with mkdir and changing directories with cd. It also covers removing folders with rmdir, listing files with ls, using the vi text editor to create and save files, and deleting files with rm. Basic commands like logging out with ctrl-D and compiling/running Java programs are also summarized. The tutorial is intended as part of a Java tutorial series.
This document provides a tutorial on using Java and essential Linux commands. It discusses using javac and java to check installation, creating folders with mkdir and changing directories with cd. It also covers removing folders with rmdir, listing files with ls, using the vi text editor to create and save files, and deleting files with rm. Basic commands like logging out with ctrl-D and compiling/running Java programs are also summarized. The tutorial is intended as part of a Java tutorial series.
This document provides a tutorial on using Java and essential Linux commands. It discusses using javac and java to check installation, creating folders with mkdir and changing directories with cd. It also covers removing folders with rmdir, listing files with ls, using the vi text editor to create and save files, and deleting files with rm. Basic commands like logging out with ctrl-D and compiling/running Java programs are also summarized. The tutorial is intended as part of a Java tutorial series.
Assignment solution Try to print these two figures on the screen using println and least number of strings
November 26, 2022 Java Tutorial series part 2 2
Essential Linux commands
Use tukaram(10.144.22.105) or any other linux machine
Type javac and java, to verify if java is installed and working properly. Login to tukaram [ashish@tukaram lec2]$
Create folder (directory)
mkdir <foldername> Goto that folder cd <foldername> cd - To use or work into the folder Remove a folder rmdir <foldername> list all file in the folder ls
November 26, 2022 Java Tutorial series part 2 3
Vi (Vim) Vi is notepad of Linux. Used to write programs Works in 2 modes Command mode - While in vi, press escape to go to command mode Edit mode - while in vi, if you are in command mode, press ‘i’ on keyboard once to go to edit mode .
November 26, 2022 Java Tutorial series part 2 4
Vi … vi <filename> To create a new file or existing file. e.g. vi int1.java Before start typing, press ‘i’ to goto edit mode and type the program. To save program Press escape and then these 2 characters “:w” To save and quit vi Press escape and then these 3 characters “:wq” To quit vi without saving the latest changes Press escape and then these 3 characters “:q!”
November 26, 2022 Java Tutorial series part 2 5
Essential Linux commands rm <filename> This command deletes the file specified e.g. rm int1.class