top ad

Monday, June 16, 2014

linux method to write practical

Aim of the Experiment
Create a user Student and assign the password to P@ssw0rd.
Objective
The main objective of the experiment is to create a user and assign password. We need to use ‘useradd’ command, which is responsible for creating a new user or update default new user information.
The ‘useradd’ command creates a new user account using the values specified on the command line and the values from the system. The new user account will be entered into the system files (/etc/passwd) as needed, the home directory (/home/username) will be created, and initial files copied, depending on the command line options.
System Requirements
Hardware Requirement:
PIV Computer
512 MB RAM
40 GB Hard Disk
Software Requirement:
Linux OS
Aim of the Experiment
Create a user Student and assign the password to P@ssw0rd.
Objective
The main objective of the experiment is to create a user and assign password. We need to use ‘useradd’ command, which is responsible for creating a new user or update default new user information.
The ‘useradd’ command creates a new user account using the values specified on the command line and the values from the system. The new user account will be entered into the system files (/etc/passwd) as needed, the home directory (/home/username) will be created, and initial files copied, depending on the command line options.
System Requirements
Hardware Requirement:
PIV Computer
512 MB RAM
40 GB Hard Disk
Software Requirement:
Linux OS
Algorithm
Syntax:
Syntax is as follows for useradd command:
useradd <username>
By default the user account is locked, you need to setup a new password:
Passwd <username>
Code:

# adduser Student
# passwd Student   

Output
# adduser Student
# passwd Student
Changing password for user Student.
New password: P@ssw0rd
Retype new password: P@ssw0rd
Passwd: all authentication tokens updated successfully.
Conclusion
In this way, a user Student with the password P@ssw0rd is created successfully.


Aim of the Experiment
Display the name of current working directory.
Objective
The main objective of the experiment is to display the name of the current working directory. The current directly is the directory in which a user is working at a given time. Even user is always working within a directly. There are several ways of determining what the current directly is. One is by looking at the command prompt. The ‘pwd’ command displays the absolute pathname of the current working directory to the computer screen.
System Requirements
Hardware Requirement:
PIV Computer
512 MB RAM
40 GB Hard Disk
Software Requirement:
Linux OS
Algorithm
Syntax:
Syntax is as follows:
pwd
Code:

# pwd   

Output
# pwd
Output: /root/user
Conclusion
In this way, the name of the currently working directory is displayed.

Aim of the Experiment
List all the files and directories in /etc file system.
Objective
The main objective of the experiment is to list all the files and directories in /etc file system. The ‘ls’ command lists all the files and directories in  /etc file system.
System Requirements
Hardware Requirement:
PIV Computer
512 MB RAM
40 GB Hard Disk
Software Requirement:
Linux OS
Algorithm
Syntax:
Syntax is as follows:
ls [/directory_name]
Code:

# ls /etc   

Output
# ls /etc
Output:
acpi        fstab        magic        rc.local    adduser.conf
fstab.d        magic.mime            mail.rc    report    apm        group-    rmt
Conclusion
In this way, the files and direcotries in /etc file system is listed.


Syntax:
Syntax is as follows for useradd command:
useradd <username>
By default the user account is locked, you need to setup a new password:
Passwd <username>
Code:

# adduser Student
# passwd Student   

Output
# adduser Student
# passwd Student
Changing password for user Student.
New password: P@ssw0rd
Retype new password: P@ssw0rd
Passwd: all authentication tokens updated successfully.
Conclusion
In this way, a user Student with the password P@ssw0rd is created successfully.


Aim of the Experiment
Display the name of current working directory.
Objective
The main objective of the experiment is to display the name of the current working directory. The current directly is the directory in which a user is working at a given time. Even user is always working within a directly. There are several ways of determining what the current directly is. One is by looking at the command prompt. The ‘pwd’ command displays the absolute pathname of the current working directory to the computer screen.
System Requirements
Hardware Requirement:
PIV Computer
512 MB RAM
40 GB Hard Disk
Software Requirement:
Linux OS
Algorithm
Syntax:
Syntax is as follows:
pwd
Code:

# pwd   

Output
# pwd
Output: /root/user
Conclusion
In this way, the name of the currently working directory is displayed.

Aim of the Experiment
List all the files and directories in /etc file system.
Objective
The main objective of the experiment is to list all the files and directories in /etc file system. The ‘ls’ command lists all the files and directories in  /etc file system.
System Requirements
Hardware Requirement:
PIV Computer
512 MB RAM
40 GB Hard Disk
Software Requirement:
Linux OS
Algorithm
Syntax:
Syntax is as follows:
ls [/directory_name]
Code:

# ls /etc   

Output
# ls /etc
Output:
acpi        fstab        magic        rc.local    adduser.conf
fstab.d        magic.mime            mail.rc    report    apm        group-    rmt
Conclusion
In this way, the files and direcotries in /etc file system is listed.

0 comments to “linux method to write practical”

Post a Comment

ShareThis

Total Pageviews