Last active 1745555388

Revision 7cf79f0b0edc596e5f48bea02254cc4ad670743a

Ker.txt Raw
124. Theory
2A. Explain Kernel in brief.
3The kernel is the core component of the CentOS 7 operating system. It manages system resources, enables communication between hardware and software, and handles process scheduling, memory management, device management, and system calls. In CentOS 7, it is a Linux kernel (version 3.10 by default) designed for stability and long-term support.
4B. Explain Shell and its types in brief.
5The shell is a command-line interpreter that allows users to interact with the operating system. It takes user commands and passes them to the kernel for execution.
6Common types of shells in CentOS 7 include:
7- Bash (Bourne Again Shell): Default shell in CentOS.
8- Sh (Bourne Shell): Original shell, basic scripting.
9- Ksh (Korn Shell): More programming features.
10- Csh (C Shell): C-like syntax, used in academic circles.
11- Zsh (Z Shell): Advanced features and customization.
12C. Explain about the Sudo command in brief.
13`sudo` (superuser do) is used to execute commands with elevated privileges. In CentOS 7, it allows permitted users to run administrative tasks without logging in as root. Configuration is managed via the /etc/sudoers file.
14Example: sudo yum install httpd
15D. Explain Umask Value in detail.
16`umask` stands for 'user file creation mode mask'. It determines default permission bits for newly created files and directories. In CentOS 7:
17- Default umask is 0022:
18 - Files get 644 (rw-r--r--)
19 - Directories get 755 (rwxr-xr-x)
20- It subtracts from the maximum permissions:
21 File: 666 - umask
22 Dir: 777 - umask
23E. Explain in detail File system hierarchy and the all the directories in `/`.
24CentOS 7 follows the Filesystem Hierarchy Standard (FHS):
25- /: Root directory. Top of the hierarchy.
26- /bin: Essential binary commands.
27- /boot: Boot loader files (e.g., vmlinuz, grub).
28- /dev: Device files.
29- /etc: Configuration files.
30- /home: Users’ home directories.
31- /lib, /lib64: Shared libraries.
32- /media, /mnt: Mount points for external storage.
33- /opt: Optional software.
34- /proc: Virtual filesystem with kernel info.
35- /root: Home of root user.
36- /run: Runtime information.
37- /sbin: System binaries.
38- /srv: Data for services.
39- /sys: System and device info.
40- /tmp: Temporary files.
41- /usr: Secondary hierarchy, user applications.
42- /var: Variable data like logs, mail, etc.
4323. File Permission Task
44Using Symbolic Method:
45a. To File Fin in Ace folder:
46• chmod u+w Ace/Fin
47• chmod g=rw Ace/Fin
48• chmod o-rwx Ace/Fin
49
50b. To File Data in Ace folder:
51• chmod u+rwx Ace/Data
52• chmod g-r Ace/Data
53• chmod o=x Ace/Data
54
55c. To File Matrix in Ace folder:
56• chmod a+wx Ace/Matrix
57Using Numeric Method:
58d. To File Log in Spade folder:
59chmod 774 Spade/Log
60e. To File Message in Spade folder:
61chmod 640 Spade/Message
62f. To File Error in Spade folder assign 761 and explain:
63chmod 761 Spade/Error
64761 = User: rwx (7), Group: rw (6), Others: x (1)