0% found this document useful (0 votes)
14 views

Lab 3os

This document contains information about operating system commands in Linux. It discusses the date, cal, cat, head, tail, ls -l, chmod commands and provides examples of their usage. It also discusses installing Google Chrome and Eclipse in Ubuntu through both the terminal and web browser. For Google Chrome, it explains downloading the .deb file from the website and using it to install Chrome. For Eclipse, it lists the commands to check the Java version, install the JRE, and use snap to install Eclipse.

Uploaded by

Laiba Babar
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)
14 views

Lab 3os

This document contains information about operating system commands in Linux. It discusses the date, cal, cat, head, tail, ls -l, chmod commands and provides examples of their usage. It also discusses installing Google Chrome and Eclipse in Ubuntu through both the terminal and web browser. For Google Chrome, it explains downloading the .deb file from the website and using it to install Chrome. For Eclipse, it lists the commands to check the Java version, install the JRE, and use snap to install Eclipse.

Uploaded by

Laiba Babar
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/ 12

OPERATING SYSTEM

NAME: LAIBA BABAR


ROLL NO: 2021-BCS-019
COURSE: OPERATING SYSTEM
INSTRUCTOR: SIR ADEEL KHALID

LAB#3
TASL#1 PERFORM ALL LINUX COMMANDS OF LAB3:
 Command: date
This command is used to print system date and time.

 Command: cal
cal: stands for calendar. It displays the calendar of the current month.

1
OPERATING SYSTEM

 Command: cat
It displays the content of the file sequentially with no break.
Example:
o cat > file1

 Command: head
It displays the top part/lines of the file. By default it allows 10 lines, but you can change the
settings of the number of lines to be displayed by using –n.
Examples:
o head –n25 file1.txt
This example displays the first 25 lines of the file named “file1.txt”.

 Command: tail

2
OPERATING SYSTEM

It displays the last part/lines of the file. By default it allows 10 lines, but you can change the
settings of the number of lines to be displayed by using –n.
Examples:
o tail –n25 file1.txt

 Command: ls -l
This command is use to find permission level of the file.

 Command: chmod
Each file in UNIX/LINUX has an associated permission level. This allows the user to
prevent others from reading/writing/executing their files or directories.

3
OPERATING SYSTEM

 ls > file1
This command put output of ls to file1.

 ls >> file1
This command put output of ls at the end of file1.

4
OPERATING SYSTEM

 ls < file1
This command put contents to command or shell script from the file.
It takes input to Linux-command from file instead of key-board.

 sort file1
This command sorts the contents in the file1.
o cat sort_ names
In above example sort command takes input from “file1” file and output of sort command (i.e.
o tr “ [a-z]” [A-Z] < file1 > cap_ names
o cat cap _ names

 sort < file1> sort _ names

5
OPERATING SYSTEM

 cat sort_ names

TASK #2 INSTALLATION OF GOOGLE CHROME IN LINUX?


Google Chrome is one of the most popular web browsers, and you can use it on Ubuntu, too by
installing it with a few simple clicks. We can install google chrome in two either by using
terminal or by simple way.

6
OPERATING SYSTEM

 How to install Chrome on Ubuntu through the web

o Open Firefox

o Head to the Google Chrome download website.

o Choose the first option 64 bit .deb for Debian/Ubuntu.

o Choose Accept and Install.

o Save the file.

o When the download is complete, head to your Files app and click Downloads.

o Double-click to launch google-chrome-stable_current_amd64.deb. If you're having issues,

right-click the right and choose Open with Software Center.

o The Ubuntu Software Center will open. Choose the green Install button.

7
OPERATING SYSTEM

o Enter
your password.

You'll see a notification prompt about the installation being complete. You can access it from
your applications list, and sign into the browser, sync your favorites and other history across
your different operating systems or devices

 How to install Chrome on Ubuntu through the terminal


1. Launch the Terminal app
8
OPERATING SYSTEM

2. Type the following command: wget https://dl.google.com/linux/direct/google-chrome-


stable_current_amd64.deb

3. Type this command: sudo dpkg -i google-chrome-stable_current_amd64.deb


4. Enter your password

After that, you'll see that Google Chrome will be available for you in your applications menu.
You'll be able to sign in to your Google account and use the browser just like you would on any
other platform.

 TASK#3 INSTALLATION OF ECLIPSE IN UBUNTO:

You can install eclipse from terminal by typing the following commands:

o Java -version
o sudo apt update && sudo apt install default-jre
o sudo snap install --classic eclipse
o gcc

9
OPERATING SYSTEM

10
OPERATING SYSTEM

11
OPERATING SYSTEM

12

You might also like