Professional Documents
Culture Documents
UNIX
UNIX
Kernel: The kernel is the core part of the UNIX operating system. It manages system
resources and allows other programs to run and use these resources. The kernel
handles memory management, process scheduling, file management, and more.
Shell: The shell is a command-line interpreter that provides an interface for users to
interact with the operating system. It interprets the commands entered by the user and
communicates with the kernel to execute them. Examples of shells include Bash, C
shell, and Korn shell.
Internal Command: An internal command is built into the shell itself and does not
require an external executable to run. Examples include cd, echo, pwd, set, and
export.
External Command: An external command is a separate executable file located in
one of the directories listed in the PATH environment variable. Examples include ls,
grep, awk, sed, and find.
The UNIX file system is a hierarchical structure consisting of files and directories.
The top of the hierarchy is the root directory, represented by a slash (/). It includes
several important directories like /bin for binary executables, /etc for configuration
files, /home for user home directories, and /var for variable files like logs.
Absolute Pathname: Specifies a complete path from the root directory. For example,
/home/user/docs/file.txt.
Relative Pathname: Specifies a path relative to the current working directory. For
example, if the current directory is /home/user, a relative path might be
docs/file.txt.
Absolute Permission: Permissions set using numeric values (e.g., chmod 755
filename).
Relative Permission: Permissions set using symbolic notation (e.g., chmod u+x
filename).
Hard Link: A directory entry that associates a name with a file on a file system. Hard
links share the same inode.
Soft Link (Symbolic Link): A file that points to another file by name. If the target
file is deleted, the link becomes broken.
Significance: Hard links cannot span different file systems, while soft links can. Soft
links can also link to directories.
Standard Input (stdin): The default source of input for a program, typically the
keyboard.
Standard Output (stdout): The default destination for output from a program,
typically the terminal screen.
Standard Error (stderr): The default destination for error messages, typically the
terminal screen, separate from stdout.
A zombie state refers to a terminated process that still has an entry in the process
table. It occurs when the process has finished execution but its parent has not yet
called wait() to read its exit status.
The priority of a process can be reduced using the nice command. For example, nice
-n 10 command runs the command with a lower priority.
Environment variables are dynamic values that affect the processes or programs on a
computer. They are used to pass information into processes that are spawned from the
shell. Common environment variables include PATH, HOME, USER, and SHELL.