Assignment 3 Os
Assignment 3 Os
A: 1) Ubuntu:
Derived from Ubuntu, Linux Mint offers a familiar environment with either
Cinnamon or Mate desktops. It distinguishes itself with multimedia codecs and
proprietary software pre-installed, catering to users seeking a hassle-free
experience.
3) Debian:
With a history dating back to 1993, Debian is celebrated for its stability and
reliability. Its slow-release cycle ensures robustness, serving as the foundation for
other distributions like Ubuntu, which aims to enhance Debian's user-friendliness.
Red Hat Enterprise Linux (RHEL) is a commercial distribution known for its rigorous
testing and extended support period. CentOS, a community project, provides a free
alternative by stripping away trademarks from RHEL. Both are revered for stability,
making CentOS a popular choice for long-term usage.
5) Fedora:
Focused on free software, Fedora delivers the latest software versions with its
GNOME3 desktop environment. While less stable compared to other distributions,
Fedora appeals to users seeking cutting-edge features and updates.
ii. rm
Remove the specified file(s) or directory/directories from the file system.
Use with caution as it permanently deletes files without moving to trash.
iii. Mv
(source path, destination path):
Move a file or directory from the source path to the destination path.
Can also be used to rename files or directories.
iv. Cp
(source path, destination path):
Copy a file or directory from the source path to the destination path.
Creates a duplicate of the file with the same content at the specified destination.
v. mkdir(directory_path):
Create a new directory at the specified path in the file system.
vi. cd(directory_path):
Change the current working directory to the specified directory path.
vii. date():
Display the current date and time. Can also be used to set the system date and time.
viii. time(command):
Measure the execution time of the specified command.
ix. bc(expression):
Launch a basic command-line calculator and evaluate the provided mathematical
expression.
x. history():
Display a list of previously executed commands in the current shell session.
Draw the directory structure of linux file system
A: 1. Open a Terminal:
sudo id <username>
o This will display the user’s UID (user ID), GID (group ID), and group
memberships.
4. Set a Password:
o To allow the new user to log in, set a password using the following
command
sudo passwd <username>
Read (r) : The read permission allows you to open and read the content of a file.
But you can't do any editing or modification in the file.
Write (w) : The write permission allows you to edit, remove or rename a file. For
instance, if a file is present in a directory, and write permission is set on the file
but not on the directory, then you can edit the content of the file but can't remove,
or rename it.
Execute (x): In Unix type system, you can't run or execute a program unless
execute permission is set.
+:
Add permissions.
▪
▪ -: Remove permissions.
▪ =: Set permissions to specific values.
3. Changing Permissions:
o The chmod command is used to change file permissions.
o Basic syntax: chmod [option] [mode] [file_or_folder_name].
4. Examples:
o To add read, write, and execute permissions to a file: chmod +rwx
filename
o To remove write and execute permissions: chmod -wx filename
o To allow executable permissions: chmod +x filename
000 0 ---
001 1 --x
010 2 -w-
011 3 -wx
100 4 r--
101 5 r-x
110 6 rw-
111 7 rwx
1 - execute only
0 – none
To install :
Open a terminal window (you can find the terminal application in your
applications menu).
A:
9. Explain file attributes in linux.
A: File attributes are settings associated with computer files that grant or deny certain
rights to how a user or the operating system can access that file.
1. File Name: A string of characters used to identify the file. It is usually human-
readable and provides a meaningful name to the file.
2. Identifier: A unique number assigned to the file by the file system. This identifier
is not usually exposed to users and is used internally by the operating system to
manage files.
3. Type: Specifies the type or format of the file, such as .zip for archive files, .c or
.java for source code files, .docx for Word documents, .txt for plain text files, etc.
4. Location: Specifies the directory path where the file is stored on the device. It
serves as a pointer to the physical location of the file within the file system.
5. Size: Indicates the current size of the file, typically measured in kilobytes (KB),
megabytes (MB), gigabytes (GB), etc. It may also include information about the
maximum allowed size of the file.
6. Protection: Provides information about access control permissions for the file,
determining who can read, write, execute, or modify the file. This attribute helps
ensure the security and integrity of sensitive or private information stored in the file.
7. Time, Date, and User Identification: Records metadata about the file, including the
date and time when the file was created, last modified, accessed, etc. It may also
include information about the user who created or modified the file, helping in
tracking file activity and ownership.
10. Write the differences between linux ,mac and windows os.
A::