Experiment No.
01
Aim: Installation of Linux operating system using CD/DVD/USB drive or PXE boot.
Tools Required: Linux operating system(any flavor) CD/DVD/USB.
Objective: To learn installation of Linux operating system.
Thoery:
1. Boot your system with OpenSUSE 12.3 installation media i.e CD/DVD or ISO image.
2. Choose installation options to install openSUSE 12.3 on you system. Please
select openSUSE 12.3 GNOME Live options to test it, before installation.
3. Loading Linux kernel.
4. Welcome screen, From where we can select Language and keyboard layout.
Read license agreement and proceed further installation once agreed.
5. Clock and timezone settings.
6. Please click on change if you want custom setting of date and time. You can
change it manually or sync with NTP Server as show below. Click Accept once
done.
Set Date and Time
7. File system partitioning. We opted default filesystem partition. You may
choose manual filesystem partitioning as options provided.
OpenSuse File System Partitioning
8. Create new user and it’s password. Uncheck all three options. Click
on change to select authentication method.
Create User and Password
9. Please select authentication method and click on Accept.
Select Authentication Method
10. Set root user password and click on Next.
Set root User and Password
11. Verify settings, you may change settings after clicking on headlines or click
on Change button. Once done click on Install.
Verify OpenSuse Settings
12. Installation confirmation. Click on Install to proceed.
Start OpenSuse Installation
13. Performing installation. Creating volume and formatting filesystem for
installation. Sit back and relax… This may take several time.
Performing OpenSuse Installation
14. Installation completed, remove installation media and click on Reboot Now.
OpenSuse Installation Completed
15. Post installation.
OpenSuse Post Installation
16. Login screen. Supply password for user created during installation.
OpenSuse Login Screen
17. openSUSE 12.3 Desktop.
OpenSuse 12.3 Desktop
Conclusion: Hence we have implemented installation of Linux operating system.
Experiment No. 02
1. Aim: Execution of various file & directory handling commands.
Tools Required: Linux operating system.
Objective: To learn how to implement and usage of file and directory handling
commands.
Theory:
mkdir - make directories
Usage
mkdir [OPTION] DIRECTORY
Options
Create the DIRECTORY(ies), if they do not already exist.
Mandatory arguments to long options are mandatory for short options too.
-m, mode=MODE set permission mode (as in chmod), not rwxrwxrwx - umask
-p, parents no error if existing, make parent directories as needed
-v, verbose print a message for each created directory
-help display this help and exit
-version output version information and exit
cd - change directories
Use cd to change directories. Type cd followed by the name of a directory to access that
directory.Keep in mind that you are always in a directory and can navigate to directories
hierarchically above or below.
mv- change the name of a directory
Type mv followed by the current name of a directory and the new name of the directory.
Ex: mv testdir newnamedir
pwd - print working directory
will show you the full path to the directory you are currently in. This is very handy to use,
especially when performing some of the other commands on this page
rmdir - Remove an existing directory
rm -r
Removes directories and files within the directories recursively.
chown - change file owner and group
Usage
chown [OPTION] OWNER[:[GROUP]] FILE
chown [OPTION] :GROUP FILE
chown [OPTION] --reference=RFILE FILE
Options
Change the owner and/or group of each FILE to OWNER and/or GROUP. With --reference,
change the owner and group of each FILE to those of RFILE.
-c, changes like verbose but report only when a change is made
-dereference affect the referent of each symbolic link, rather than the symbolic link itself
-h, no-dereference affect each symbolic link instead of any referenced file (useful only on
systems that can change the ownership of a symlink)
-from=CURRENT_OWNER:CURRENT_GROUP
change the owner and/or group of each file only if its current owner and/or group match
those specified here. Either may be omitted, in which case a match is not required for the
omitted attribute.
-no-preserve-root do not treat `/' specially (the default)
-preserve-root fail to operate recursively on `/'
-f, -silent, -quiet suppress most error messages
-reference=RFILE use RFILE's owner and group rather than the specifying
OWNER:GROUP values
-R, -recursive operate on files and directories recursively
-v, -verbose output a diagnostic for every file processed
The following options modify how a hierarchy is traversed when the -R option is also
specified. If more than one is specified, only the final one takes effect.
-H if a command line argument is a symbolic link to a directory, traverse it
-L traverse every symbolic link to a directory encountered
-P do not traverse any symbolic links (default)
chmod - change file access permissions
Usage
chmod [-r] permissions filenames
r Change the permission on files that are in the subdirectories of the directory that you are
currently in. permission Specifies the rights that are being granted. Below is the
different rights that you can grant in an alpha numeric format.filenames File or directory
that you are associating the rights with Permissions
u - User who owns the file.
g - Group that owns the file.
o - Other.
a - All.
r - Read the file.
w - Write or edit the file.
x - Execute or run the file as a program.
Numeric Permissions:
CHMOD can also to attributed by using Numeric Permissions:
400 read by owner
040 read by group
004 read by anybody (other)
200 write by owner
020 write by group
002 write by anybody
100 execute by owner
010 execute by group
001 execute by anybody
ls - Short listing of directory contents
-a list hidden files
-d list the name of the current directory
-F show directories with a trailing '/'
executable files with a trailing '*'
-g show group ownership of file in long listing
-i print the inode number of each file
-l long listing giving details about files and directories
-R list all subdirectories encountered
-t sort by time modified instead of name
cp - Copy files
cp myfile yourfile
Copy the files "myfile" to the file "yourfile" in the current working directory. This command
will create the file "yourfile" if it doesn't exist. It will normally overwrite it without warning
if it exists.
cp -i myfile yourfile
With the "-i" option, if the file "yourfile" exists, you will be prompted before it is
overwritten.
cp -i /data/myfile
Copy the file "/data/myfile" to the current working directory and name it "myfile". Prompt
before overwriting the file.
cp -dpr srcdir destdir
Copy all files from the directory "srcdir" to the directory "destdir" preserving links (-
poption), file attributes (-p option), and copy recursively (-r option). With these options, a
directory and all it contents can be copied to another dir
Conclusion: Hence we have implemented various file and directory handling commands.