Linux Intern Report
Linux Intern Report
TOPIC PAGE
NO
1. INTRODUCTION TO LINUX 09
2. INSTALLATION OF LINUX 10 - 22
1. INTRODUCTION TO LINUX
2. INSTALLATION OF LINUX
10
11
12
13
Do the following:
14
15
Make sure that you don't uncheck the "Start" box before
doing this.
16
17
Click.
Click Next.
19
Click Next.
20
Click Start.
22
1) pwd Command
‘pwd’ command prints the absolute path to current working
directory.
$ pwd
/home/raghu
2) cal command
Displays the calendar of the current month.
$ cal
July 2012
Su Mo Tu We ThFr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
23
‘cal ’ will display calendar for the specified month and year.
$ cal 08 1991
August 1991
Su Mo Tu We ThFr Sa
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
3) echo command
This command will echo whatever you provide it.
$ echo "linoxide.com"
linoxide.com
$ date
Fri Jul 6 01:07:09 IST 2012
If you are interested only in time, you can use 'date +%T' (in
hh:mm:ss):
24
$ date +%T
01:13:14
5) tty command
Displays current terminal.
$ tty
/dev/pts/0
6) whoami command
This command reveals the user who is currently logged in.
$ whoami
raghu
7) id command
This command prints user and groups (UID and GID) of the
current user.
$ id
uid=1000(raghu) gid=1000(raghu)
groups=1000(raghu),4(adm),20(dialout),24(cdrom)
,46(plugdev),112(lpadmin),120(admin),122(sam-
bashare)
8) clear command
This command clears the screen.
25
9) help option
With almost every command, ‘--help’ option shows usage
summary for that command.
$ date --help
Usage: date [OPTION]... [+FORMAT] or: date [-u|--utc|--univer-
sal] [MMDDhhmm[[CC]YY][.ss]]
What is command
This command gives a one line description about the com-
mand. It can be used as a quick reference for any command.
$ whatis date
date (1) - print or set the system date and
time
$ whatiswhatis
whatis (1) - display manual page descriptions
•Manual Pages
‘--help’ option and ‘whatis’ command do not provide thorough
information about the command. For more detailed informa-
tion, Linux provides man pages and info pages. To see a com-
mand's manual page, man command is used.
26
27
28
HOME DIRECTORY
29
LISTING DIRECTORIES
To list the files in a directory, you can use the follow-
ing syntax −
$lsdirname
Following is the example to list all the files contained
in /usr/local directory −
$ls /usr/local
X11 bin gimp jikessbin
ace doc include lib share
atalketc info man ami
CREATING DIRECTORIES
We will now understand how to create directories.
Directories are created by the following command –
$mkdirdirname
$mkdir /tmp/amrood/test
mkdir: Failed to make directory
"/tmp/amrood/test";
No such file or directory
$
In such cases, you can specify the -p option to
the mkdir command. It creates all the necessary directories for
you. For example –
$mkdir -p /tmp/amrood/test
$
The above command creates all the required parent directories.
REMOVING DIRECTORIES
Directories can be deleted using the rmdir command
as follows −
$rmdirdirname
$
31
4.2GRANTING PERMISSIONS
Note that “r” is for read, “w” is for write, and “x” is
for execute.
32
0 = No Permission
1 = Execute
2 = Write
4 = Read
0 = ---
1 = --x
2 = -w-
3 = -wx
4 = r-
5 = r-x
6 = rw-
7 = rwx
33
5. USER MANAGEMENT
ROOT
The root user is the superuser and have all the powers
for creating a user,deleting a user and can even login with the
other user's account.
34
USERADD
With useradd commands you can add a user.
Syntax:
useradd -m -d /home/<userName> -c "<userName>" <userName>
Example:
useradd -m -d /home/xyz -c "xyz" xyz
USERDEL
Syntax:
userdel -r <userName>
Example:
userdel -r xyz
35
Example:
userdel -r john
USERMOD
The command usermod is used to modify the properties of an
existing user.
Syntax:
usermod -c <'newName'> <oldName>
Example:
usermod -c 'jhonny' john
36
37
6. PROCESS MANAGEMENT
WHAT IS A PROCESS?
When using the Terminal, you will have to wait, until the
foreground process runs.
38
39
FG
PS
40
KILL
41
7. SHELL SCRIPTING
43
#!/bin/sh
44
45
46
47
48
49
8. SUMMARY
Command Description
bg To send a process to the background
fg To run a stopped process in the foreground
top Details on all Active Processes
ps Give the status of processes running for a user
ps PID Gives the status of a particular process
pidof Gives the Process ID (PID) of a process
kill PID Kills a process
nice Starts a process with a given priority
renice Changes priority of an already running process
df Gives free hard disk space on your system
free Gives free RAM on your system
9. REFERENCES
50
4. www.geeksforgeeks.org
5. www.tutorialspoint.com
6. www.youtube.com
7. www.Virtual Box.org
51