EO2-Linux Network and Process Managment

Process
  • A process is a set of instructions that is loaded in a memory.
  •  A process in Linux is nothing but a running program.
  • Each process will have a unique process ID (PID) and other resources, like memory and CPU time.
A process can be in only one state at an instance. They can be of the following instances:
  • Running: It is executing the code currently.
  • Ready: It is ready to be executed but is waiting for CPU time.
  • Sleeping: It is temporarily stopped so that other processes are finished first.
  • Stopped: The process is stopped by the system or the user.
  • Zombie: The execution is completed but it still has an entry in the process table.

Process Management

ps
- report a snapshot of the current process.
ps -a -- All terminals
ps -e -- List of all the processes
ps -o --(customer properties)
ps -ao --tty, comm, pid, %mem, %cpu

top
- real-time process monitor that displays the information about all running processes.

kill
- it is used to stop a process


Network Configuration

ifconfig or ip addr or ip link
- this command can access all the network interface names.

ip route
- access the routing information of the network that our device is connected to.

Network Configuration Files
  •  /etc/host.conf - contains order in which hostname are resolved.
  • /etc/hosts - map ip address to hostname/domain name
  • /etc/hostname - contains the name of your system hostname which can be used to identify your system in the network.

Firewall Configuration

- ufw(uncomplicated firewall).

Sudo ufw enable to enable firewall.

We can block out certain websites using this command.
The command is sudo ufw deny out to <ip address> of the website you want to block out.
The nslookup command can be used to know the ip address of any website.

sudo ufw delete deny out to <ip address> of the website you blocked out earlier will make that website accessible once again.








Comments

Popular posts from this blog

Topic D02 Introduction to Linux

Topic D01- Container Technology