linux-day3
linux-day3
Azza Khalel
[email protected]
Azza Khalel | LinkedIn
Day3 contents
• Processes, priorities and signals Concepts .
• Bash shell properties
• Shell history
• Auto complete
• File globbing
• Alias
• I/O & error redirection
• Piping
• Environment variables [HOME, PATH, PWD,SHELL, 0, PS1, PS2]
• Initialization and startup files
• Job control
Processes
• Every program you run creates a process (shell, command, an application)
• Everything that happens on a Linux server, a process is started.
• System starts processes called daemons which are processes that run in the
background and provide services.
• Every processes has a PID.
• When a process creates another, the first is the parent of the new process. The
new process is called the child process.
• In older versions of Linux, killing a parent process would kill all of its child
processes.
• Start from RHEL 8, if you kill a parent process, all of its child processes become
children of the systemd process.
• Types of process:
• Shell jobs.
• Daemons.
• Kernel threads.
Listing processes
• ps (process status) command
• ps [options]
• Outputs
• PID.
• TTY -> terminal identifier.
• Execution time.
• Command name.
• Options
• -e: all system processes.
• -f: full information.
• -u <uid>: display processes of that user.
• – a: all processes attached to a terminal.
• – x:all other processes.