(ISHITA) Call Girls Manchar ( 7001035870 ) HI-Fi Pune Escorts Service
Lab#1-2.pdf
1. Operating System Lab (CS-2205P)
Lecture 01-02 (Introduction)
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 1 / 20
2. Agenda
1 Introduction to Linux
2 File permissions
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 2 / 20
3. Introduction to Linux
Agenda
1 Introduction to Linux
2 File permissions
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 3 / 20
4. Introduction to Linux
Linux Operating System
Linux is used at many places which includes
Enterprise servers
Cloud (AWS, Azure)
Mobile (Android)
DevOps (Continuous Integration/Deployment)
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 4 / 20
5. Introduction to Linux
Linux Operating System
Linux is an operating system or a kernel distributed under an
open-source license
The kernel is a program at the heart of the Linux operating system
that takes care of fundamental stuff, like letting hardware
communicate with software
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 5 / 20
6. Introduction to Linux
Linux Operating System
Linux is an operating system or a kernel distributed under an
open-source license
The kernel is a program at the heart of the Linux operating system
that takes care of fundamental stuff, like letting hardware
communicate with software
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 5 / 20
7. Introduction to Linux
Linux Distributions
Android
Red Hat Linux (CentOS and Fedora)
SUSE Linux (OpenSUSE)
Scientific Linux
Kali Linux
Raspbian
Ubuntu
Mint
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 6 / 20
8. Introduction to Linux
Ubuntu
Ubuntu is the modern, open source operating system on Linux for the
enterprise server, desktop, cloud, and IoT
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 7 / 20
9. Introduction to Linux
Ubuntu Versions
14.04 LTS
14.1
15.1
16.04 LTS
16.1
17.1
18.04 LTS
18.1
19.1
20.04 LTS
20.1
21.04
21.1
22.04 LTS
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 8 / 20
10. Introduction to Linux
Installing Linux
Linux can be installed primarily in three ways
System-wide installation
Using Virtualization [Para] (VMware, VirtualBox, Xen )
Using Windows 10 Subsytem of Linux
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 9 / 20
11. Introduction to Linux
Directory Hierarchy of Linux
Linux can be installed primarily in three ways
bin – Binary files for (single user mode) system commands
sbin – Binary files for (multi-user) system commands
boot Linux images and boot configuration files
etc Configuration files
home User files
root Root User files
usr Additional binaries
var Updating files: logs, application data, cache
proc Files representing running system processes
dev Pseudo files representing devices
sys Kernel resources
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 10 / 20
12. Introduction to Linux
Directory Hierarchy of Linux
Linux can be installed primarily in three ways
bin – Binary files for (single user mode) system commands
sbin – Binary files for (multi-user) system commands
boot Linux images and boot configuration files
etc Configuration files
home User files
root Root User files
usr Additional binaries
var Updating files: logs, application data, cache
proc Files representing running system processes
dev Pseudo files representing devices
sys Kernel resources
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 10 / 20
13. Introduction to Linux
Directory Hierarchy of Linux
Linux can be installed primarily in three ways
bin – Binary files for (single user mode) system commands
sbin – Binary files for (multi-user) system commands
boot Linux images and boot configuration files
etc Configuration files
home User files
root Root User files
usr Additional binaries
var Updating files: logs, application data, cache
proc Files representing running system processes
dev Pseudo files representing devices
sys Kernel resources
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 10 / 20
14. Introduction to Linux
Directory Hierarchy of Linux
Linux can be installed primarily in three ways
bin – Binary files for (single user mode) system commands
sbin – Binary files for (multi-user) system commands
boot Linux images and boot configuration files
etc Configuration files
home User files
root Root User files
usr Additional binaries
var Updating files: logs, application data, cache
proc Files representing running system processes
dev Pseudo files representing devices
sys Kernel resources
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 10 / 20
15. Introduction to Linux
Directory Hierarchy of Linux
Linux can be installed primarily in three ways
bin – Binary files for (single user mode) system commands
sbin – Binary files for (multi-user) system commands
boot Linux images and boot configuration files
etc Configuration files
home User files
root Root User files
usr Additional binaries
var Updating files: logs, application data, cache
proc Files representing running system processes
dev Pseudo files representing devices
sys Kernel resources
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 10 / 20
17. File permissions
Owners
User
A user is the owner of the file. By default, the person who created a
file becomes its owner.
Group
A user- group can contain multiple users. All users belonging to a
group will have the same Linux group permissions access to the file
Other
Any other user who has access to a file. This person has neither
created the file, nor he belongs to a user-group who could own the
file. Practically, it means everybody else
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 12 / 20
19. File permissions
Changing the file permissions
chmod permissions filename
Symbolic mode
Absolute mode
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 14 / 20
20. File permissions
Changing the file permissions (Symbolic mode)
Operator Description
+ add permission to the file or directory
- remove a permission
= Sets the permission and overrides the permissions set earlier
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 15 / 20
21. File permissions
Changing the file permissions (Symbolic mode)
Operator Description
u user/owner
g group
o others
a all
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 15 / 20
22. File permissions
Changing the file permissions (Symbolic mode)
chmod u=rw- filename
chmod g=rw- filename
chmod o=rw- filename
chmod o-w filename
chmod g+w filename
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 16 / 20
23. File permissions
Changing the file permissions (Symbolic mode)
chmod u=rw- filename
chmod g=rw- filename
chmod o=rw- filename
chmod o-w filename
chmod g+w filename
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 17 / 20
24. File permissions
Changing the file permissions (Absolute mode)
Number Binary Permission type Symbol
0 000 No Permission —
1 001 Execute –x
2 010 Write -w-
3 011 Execute + Write -wx
4 100 Read r–
5 101 Read + Execute r-x
6 110 Read + Write rw-
7 111 Read + Write + Execute rwx
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 18 / 20
25. File permissions
Changing the file permissions (Absolute mode)
chmod 777 filename
chmod 001 filename
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 19 / 20
26. File permissions
Advance package tool (apt)
apt is a command-line utility for installing, updating, removing, and
otherwise managing deb packages on Ubuntu, Debian, and related
Linux
Department of CS, GCU, Lahore Operating System Lab September 10, 2022 20 / 20