Ubuntu-lab-2 - bn m m PDF

Title Ubuntu-lab-2 - bn m m
Author pramod kc
Course Human Resource, Organizational Behavior,
Institution Tribhuvan Vishwavidalaya
Pages 6
File Size 463.6 KB
File Type PDF
Total Downloads 20
Total Views 142

Summary

bn m m...


Description

IIMS College Putalisadak, Kathmandu, Nepal

Name of Course Instructor:

Course Code:

CC216n

Program Name:

Tutorial number:

Purnima Mulmi

BIT

3

Course Name:

Semester:

3rd

Tutorial Type (Individual/Group):

Operating System

Batch:

Jan 2020

Individual

Tutorial Title: Ubuntu lab-2

Max. Marks: _____

Date of Allotment: ___________

Name of the Student Manish Pandey

UCSI ID number 1002057674

Date of Submission:

Feb -07 - 2021

Contact Number Email Id 9866477739 [email protected]

Evaluation: ________________________ obtained out of _____________________________________ Evaluators Comment: ________________________________________________________________________________ ________________________________________________________________________________ ________________________________________________________________________________ ________________________________________________________________________________ ____________________

-------------------------------------------

Evaluator’s Signature & Date

IIMS College, UCSI University

Use ubuntu in VirtualBox or Go to: https://linuxcontainers.org/lxd/try-it/ Before you start the following command, make sure you are log in as super user to have administrator privileges. 1. Adding or Creating New User In order to add new user account, type adduser . Type password for new user. Re-type password for new user. Type details information of users.

2. Checking list of users Type lastlog Give a list of every single user plus the last time they logged in (or "never logged in" if that user had not logged in ever).

Operating_System_Ubuntu_Tut_1

Page 1 of 3

IIMS College, UCSI University

Type command last and evaluate the result. 3. Deleting user account Type deluser Enter username that you want to delete Evaluate the result.

Now, switch back to normal user account in order to avoid deleting or overriding system files accidently.

4. mkdir (make directory) To make a subdirectory called linuxstuff in your current working directory type mkdir linuxstuff

Operating_System_Ubuntu_Tut_1

Page 2 of 3

IIMS College, UCSI University

Evaluate the result. 5. Type ls to check all the files or folder under current directory. 6. Go under linuxstuff directory. cd linuxstuff 7. Creating files under linuxstuff directory Type touch file1 Type ls Type touch file2 Type ls Evaluate the result.

8. Displaying message on screen. Type echo “This is a test message”;CC 216 Operating Systems Jan-Apr 2021 9. Writing date to a file. Type echo “This is test message for file1” >file1 Type echo “This is test message for file2” >file2 Evaluate the result.

Operating_System_Ubuntu_Tut_1

Page 3 of 3

IIMS College, UCSI University

10. Copying file contents. Type cp file1 file3

Copies the contents of file1 into file3. If file3 does not exist, it is created; otherwise, file3 is silently overwritten with the contents of file1. Evaluate the result. Type cp –i file1 file2 Evaluate the result

Operating_System_Ubuntu_Tut_1

Page 4 of 3

IIMS College, UCSI University

Like above however, since the "-i" (interactive) option is specified, if file3 exists, the user is prompted before it is overwritten with the contents of file1. Try: i. ii. Copy the contents of file1 (into a file named file1) inside of directory newdir. Copy the contents of the directory linuxstuff. If directory newdir does not exist, it is created. Otherwise, it creates a directory named newdir 11. Moving file to different directory. Type mv Type mkdir dir1 Type mv oridirectoryname/file1 newdir/

12. Deleting (removing) files or directories Type rm Type rm file1 Type rm –i file2 Evaluate the answer

Operating_System_Ubuntu_Tut_1

Page 5 of 3...


Similar Free PDFs