0% found this document useful (0 votes)
65 views15 pages

(F2-Formative) - Linux Installation, Environment Familiarization and File Creation Commands-1

The document provides instructions for a laboratory exercise on Linux installation and file commands. It discusses: 1) Installing CentOS virtual machine in VirtualBox and exploring the Linux environment compared to Windows 10. 2) Using directory commands like ls, cd, mkdir, rmdir, pwd, and clear to view contents, change directories, create and remove directories, print the current working directory, and clear the screen. 3) Creating files and practicing file manipulation commands like touch, cp, mv, rm.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views15 pages

(F2-Formative) - Linux Installation, Environment Familiarization and File Creation Commands-1

The document provides instructions for a laboratory exercise on Linux installation and file commands. It discusses: 1) Installing CentOS virtual machine in VirtualBox and exploring the Linux environment compared to Windows 10. 2) Using directory commands like ls, cd, mkdir, rmdir, pwd, and clear to view contents, change directories, create and remove directories, print the current working directory, and clear the screen. 3) Creating files and practicing file manipulation commands like touch, cp, mv, rm.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

COMPUTER ENGINEERING DEPARTMENT

CPEOPSYSLA
(OPERATING SYSTEM - LAB)

EXERCISE

2
LINUX INSTALLATION/ENVIRONMENT FAMILIARIZATION AND FILE
CREATION COMMANDS

Student Name / Group


Timbol, Clark Mushu G.
Name:
Name Role
Members (if Group):

Section:
Professor: Sir Lyberius Ennio Taruc

I. PROGRAM OUTCOME/S (PO) ADDRESSED BY THE LABORATORY EXERCISE


 Ability to demonstrate understanding and proficiency of IT specialization [PO: I]
 Ability to use and apply current technical concepts and practices in the core information technologies; human
computer interaction, information management, programming, networking and web systems and
technologies. [PO: J]

II. COURSE LEARNING OUTCOME/S (CLO) ADDRESSED BY THE LABORATORY EXERCISE


 Demonstrate an understanding of Disk Operating System (DOS) and LINUX history and concepts. [CLO: 1]
 Perform file and directory creation and manipulation using DOS commands; LINUX installation in virtual
machine, file and directory creation and manipulation, and system administration using LINUX commands.
[CLO: 2]

III. INTENDED LEARNING OUTCOME/S (ILO) OF THE LABORATORY EXERCISE


At the end of this exercise, students must be able to:
 Able to perform file and directory creation, and move between directories using LINUX commands
 Able to perform file and directory creation, and move between directories using LINUX commands

IV. BACKGROUND INFORMATION

CentOS
CentOS (/ˈsɛntɒs/, from Community Enterprise Operating System) is a Linux distribution that provides a free,
enterprise-class, community-supported computing platform functionally compatible with its upstream source, Red
Hat Enterprise Linux (RHEL). In January 2014, CentOS announced the official joining with Red Hat while staying
independent from RHEL, under a new CentOS governing board.

What is a virtual machine?


A virtual machine (VM) is an operating system (OS) or application environment that is installed on software, which
imitates dedicated hardware. The end user has the same experience on a virtual machine as they would have on
dedicated hardware.

VirtualBox
Offering versatile virtualization, VirtualBox can create a virtual machine with virtually any operating system (except
those intended for ARM devices). It also offers software and hard assisted virtualization, storing virtual machines as
disk images. This makes them easy to backup or migrate to other PCs or VM applications.

CPEOPSYSLA - Operating System Laboratory Page 2 of 15


VirtualBox is
particularly good at running 32-bit and 64-bit Linux distros, as well as Windows. It’s even possible to run OS X on

Directory Commands
A. To display the contents of the current working directory
Syntax:
ls

Options that can be used with it.


-a
-A
-d
-l
-r
-R

B. To change directory
Syntax:
• cd . means the current directory
• cd .. means parent directory
• cd means will take you to your home directory
• cd – will take you to your previous directory
• cd ~ username will take you to the home directory of the user

CPEOPSYSLA - Operating System Laboratory Page 3 of 15


• cd <directory_name>
• cd <directorypath>

C. To make directory/directories
Syntax:
mkdir [-option] directory1 directory2 …
Examples:
To create directories dir1, dir2, dir3, on the current directory:
Syntax:
mkdir dir1 dir2 dir3
mkdir my\ folder

To create the directory /home/tester/mydir/testdir (mydir is not yet existing):


Syntax:
mkdir –p /home/tester/mydir/testdir

D. To remove directory
Syntax:
rmdir [-option] directoryname
*This command allows removing EMPTY directories.

Examples:
To remove the directory dir1
Syntax:
rmdir dir1

To remove the directory /home/tester/mydir/testdir and its parent directory


Syntax:
rmdir -p mydir/testdir

To remove directory that is not empty


Syntax:
rm -r directoryname
rm -rf directoryname

E. To print or display the current working directory.


Syntax: pwd

F. To clear the screen.


Syntax: clear

CPEOPSYSLA - Operating System Laboratory Page 4 of 15


G. To display previously entered commands. This information is stored the ~/.bash_history file located at the home
directory of each user.
Syntax: history

V. GRADING SYSTEM / RUBRIC (please see separate sheet)

VI. LABORATORY ACTIVITY:

PART 1: LINUX INSTALLATION/ENVIRONMENT FAMILIARIZATION

A. Setup
1. Open your Virtual Machine in your respective terminal.
2. Double click CentOS 6.4 from your Public OVAs folder located on your Desktop.
3. Click IMPORT to load your CentOS
4. Double click CentOS 6 from your VirtualBox then wait until the OS is loaded to the VM.
5. Log-in as Student and the password is password

B. Exercises
Now you're ready to begin.
1. Explore the LINUX environment to determine the hardware requirements, bundled software applications,
graphical user interface (ease of use and look and feel of the environment) and security features
2. Explore the Windows 10 environment and determine as well the above-mentioned requirements
3. Use the table below in writing down your comparison between LINUX and Windows 10

Answers:
Linux Windows 10
Minimum Hardware Requirements

• 32-bit Intel Pentium 4 or compatible processor • Processor: 1 gigahertz (GHz) or faster


running at 2 GHz or greater • 512 MB RAM processor or SoC
• GPU: NVIDIA Quadro FX 1100, FX1400, • RAM: 1 gigabyte (GB) for 32-bit or 2 GB for
FX540 64- bit
or ATI FireGL V3200, V5100 • Hard disk space: 16 GB for 32-bit OS or 20 GB
• Disk space: 350 MB for client components for 64-bit OS
• A DVD-ROM drive • Graphics card: DirectX 9 or later with WDDM
1.0
driver
• Display: 800 x 600

CPEOPSYSLA - Operating System Laboratory Page 5 of 15


Linux Windows 10
Bundled Software Applications

• Firefox. Windows Apps


• Thunderbird. • OneDrive
• LibreOffice. • Outlook
• VLC Media Player • Skype
• Shotcut. • OneNote
• GIMP. • Microsoft Teams
• Audacity. • Microsoft Edge
• Visual Studio Code.
• Virtual Box
• ClamAV

Linux Windows 10
Graphical User Interface

CPEOPSYSLA - Operating System Laboratory Page 6 of 15


Linux Windows 10
Security Features

• SELinux • Firewall & network protection


• ClamAV • App & browser control • Device Security
• SSH • Device performance & health
• Encryption • Family options
• Auditd • Virus & Threat Protection
• Fail2ban • Account Protection
• Firewall
• User Management

CPEOPSYSLA - Operating System Laboratory Page 7 of 15


PART 2: LINUX DIRECTORY AND FILE CREATION COMMANDS

Tasks / Procedure / Instructions:

A. Knowing your working directory and creating directories.

To create a new directory, use mkdir command.


Syntax: $ mkdir directoryname

1. Type the command pwd at your default prompt :~$


Paste your captured executed command below.

2. What is the meaning of pwd?


Answer:

Print Working Directory

3. Create a directory at your current directory. (Use your surname1_surname2 as your directory name)
Paste your captured executed command and output below.

4. Type ls to check the content of your current working directory.


Paste your captured executed command and output below.

CPEOPSYSLA - Operating System Laboratory Page 8 of 15


5. Create a directory tree. The following command will created a directory tree where dirC will be
created under dirB and dirB is created under dirA.
Type the command at your prompt :~$ mkdir –p dirA/dirB/dirC
Paste your captured executed command and output below.

B. Move between directories.


To move to a directory, use cd command.
Syntax: $ cd directoryname

1. Move to your surname directory.


Paste your captured executed command and output below.

2. Display your present working directory?


Paste your captured executed command and output below.

3. Move to the dirA directory. First, you need to exit from surname1_surname2 directory and go back to your home
directory. To do this, type the following:
$ cd ~ (There is a space between cd and ~)
Paste your captured executed command and output below.

4. Display your present working directory?


Paste your captured executed command and output below.

CPEOPSYSLA - Operating System Laboratory Page 9 of 15


5. Move to dirB and dirC sub-directories.
Paste your captured executed command and output below.

6. Display your present working directory?


Paste your captured executed command and output below.

7. Move one level hierarchy down from the current directory.


Type the command, cd .. (There is a space between cd and ..)
Paste your captured executed command and output below.

8. Display your present working directory?


Paste your captured executed command and output below.

9. Go back to your home directory.


Paste your captured executed command and output below.

10. Display your present working directory?


Paste your captured executed command and output below.

CPEOPSYSLA - Operating System Laboratory Page 10 of 15


C. Create a file.
To create a file, use cat command.
Syntax: $ cat >filename

1. Create a file called file1 in dirA.


$ cat >file1
My name is Bond.
James Bond.
Some call me Agent Bond.
Others call me Agent 007.
Don’t mess with me.
Ctrl+D
Paste your captured executed command and output below.

2. Open the file1.


$ cat file1
Paste your captured executed command and output below.

3. List the file/s at dirA.


Paste your captured executed command and output below.

D. Challenge

CPEOPSYSLA - Operating System Laboratory Page 11 of 15


1. List the files / directories in your surname directory.
$ ls
What files / directories do you see?
Paste your captured executed command and output below.

2. Go to your dirC directory.


Paste your captured executed command and output below.

3. Create a file called myinfo using cat command in dirC. The file should contain 25 lines about yourself. Make the first line
as your full name. Number each line.
Paste your captured executed command and output below.

CPEOPSYSLA - Operating System Laboratory Page 12 of 15


4. Open your myinfo file using cat command.
Paste your captured executed command and output below.

CPEOPSYSLA - Operating System Laboratory Page 13 of 15


Observation:

The goal of the task was to practice using different Linux tools to make folders,
move through them, and make files. The user learned how to use the'mkdir'
command to create directories, the 'cd' command to move between folders, and the
'cat' command to create and read files. The user also learned how to show files in a
location and make a file with personal information in it.
Conclusion:

The Linux programs are a useful tool for handling files and folders. They let users
make, move, and organize files quickly and easily. People who work with Linux
or other systems similar to Unix should learn how to use these tools well. The
activity showed some of the most basic Linux tools. With more practice and
exploration, users can learn how to use them well.

CPEOPSYSLA - Operating System Laboratory Page 14 of 15


VII. REFERENCES:
 Sobell, M., et al. (2017). A Practical Guide to Linux Commands, Editors, and Shell Programming, 4th Ed. Addison-
Wesley Professional
 Cobbaut, P. (2016). Mastering Linux- Networking
 Blum, R., (2015). Linux Command Line and Shell Scripting Bible
 Fox, R., (2015). Linux with operating system concepts
 Sobell, M., et al. (2017). A Practical Guide to Linux Commands, Editors, and Shell Programming, 4th Ed. Addison-
Wesley Professional
 Cobbaut, P. (2016). Mastering Linux- Networking
 Blum, R., (2015). Linux Command Line and Shell Scripting Bible
 Fox, R., (2015). Linux with operating system concepts

CPEOPSYSLA - Operating System Laboratory Page 15 of 15

You might also like