Linux Network and Process Management

                                                                              Process

  • A process in Linux is a running program/ an instance program that is being executed by the Linux kernel.
Types of Linux Processes
1. Foreground Processes
2. Background Processes

Foreground processes: A process that requires the user to start it using a terminal command on Program. It requires an input trigger from a user, so every foreground process is manually triggered.

Background Processes: A process that runs independently on user input. It can run multiple processes at the same time in a background process.


                                                                          Process State

-
  • Running: It is currently executing the code.
  • Ready: It is ready to run but waits for the CPU time.
  • Sleeping: It is temporarily halted and waiting for some event or process to become available.
  • Stopped: It is stopped by the user or by the system.
  • Zombie: The process has completed its execution but still has an entry process table.
                                                                     Process Management
Commands to manage the processes:
  1. ps: report the snapshot of current process.
  2. top: real time process monitor that display the information about all running processes.
  3. kill: Used to stop the process.
                                                                  Network Configuration
  • ifconfig/ip addr/ ip link: Can access all the network interfaces.
  • ip route: Access the routing information of network that your device is connected to.
Other network configuration files:
  • /etc/host.conf: Contains order in which hostname are resolved.
  • /etc/hosts: Map ip address or hostname/domain name.
  • /etc/hostname: Contains name of your system hostname which can be used to identify your system in the network.
                                                                    Network Commands
  • netstat: used to display various network information.
  • ping: test host connection reachability.
  • traceroute: find out the path between source and destination.
  • nslookup: obtain mapping between ip address and domain name and vice versa.
  • ssh: remote login using the shell.
                                                                    Firewall configuration

  • Sudo ufw deny out to <ip address>: replace ip address with actual ip address of the website.
  • sudo ufw reload: to reload firewall.
  • sudo ufw delete deny out to <ip address>: to unblock firewall.
  • sudo ufw disable: to disable firewall.



Comments

Popular posts from this blog

Basic structures of a computer

Client Server Architecture

Fetch, execution and IO