Showing posts with label Important directories. Show all posts
Showing posts with label Important directories. Show all posts

/etc/passwd user account database Linux

How to view User account database /etc/passwd in Linux
Linux maintain the user account database in /etc/passwd directory. It will provide one-line information about every user on the system. /etc/passwd has the permission 644 these permission provide non-root user they will see the information but they don’t have any privilege to add the data to that file.
The file has seven fields
Student:x:500:500:studentwebsite:/home/student:/bin/bash
First filed: student
It is student it is user named id
Second field: X
X refers to the shadow password
Third filed: 500
It is user id (when you add new user the user id it is star with 500)
Fourth Field: 500
Group id
Fifth Field:studentwebsite
It is full name of the specified user
Six Field:/home/student
User home directory
Seventh field:/bin/bash
It is executed by login that is often a shell /bin/bash is the final command executed by login


/etc/passwd user account database Linux

Referring kernel source structure-I| memory management, inter process communication, kernel ,PCI

Referring kernel source structure related to source tree with respect to a particular topic.
System Startup initialization
View /arch/i386/kernel/head.s it is make some architecture specific setup and proceed the main() routine in /init/main.c
Memory Management
/arch/*/mm it is directory for memory management.
Page fault handling code is in /mm/memory.c
Memory maping cache code in /mm/filemap.c
Swap cache is applied in /mm/swap.c
And buffer cache is applied in /mm/buffer.c
Kernel
/arch/*/kernel::it is directory
/kernel/sched.c ::kernel scheduler directory
/kernel/fork.c::fork codedirectory
/include/linux/interrupt.h::Bottom half handling code directory
/include/linux/sched.h::task_struct date structure directory
PCI
/drivers/pci/pci,c::PCI pseudo driver directory
/include/linux/pci.h::system wide definition directory
Interposes Communication

System V IPC object s has an ipc_term data structure present in /include/linux/ipc.h
ipc/msg.c:: system v messages are present
/ipc/shm.c::shared memory and semaphore directory
/ipc/pipes.c:: pipes are applied

Linux Kernel source structure | Linux kernel important directories

Linux Kernel has many directories and the structure of the Linux kernel source.
Linux kernel source structure generally it present in the /user/src/linux directory
There important directories are
Documentation-> these consists of documentation of all the data
Arch-> This directory has the all kernel codes particularly related to architecture and it is further divided into subdirectory like
alpha,arm,1386,m68k,mipc,ppc,sparc,and sparc64,it has
boot code, interrupt, trap handling,fp emulation and optimized utility routines.
mm subdirectories for platform-specific memory.
Drivers- this directory contains all the system’s device driver
fs-it contain file system code
Example: vfs,vfat,ext3,proc,etc
include-<most of the include files required to building kernel codes
init-These directory contain initialization code.
ipc- the kernel has inter process communication code
kernel-these directory contain main kernel code. And the architecture specific kernel is in /arch/*/kernel
lib- lib directory contains library code of the kernel and architecture specific library in /arch/*/lib
mm-mm directory has memory management code and directory /arch/*/mm
net-net directory contain networking code of the kernel
script-script directory used to configure the kernel
modules-All built modules are contain in these directory.