Linux Network and Process Management
What is Process?
- In Linux, a process is any active(running) instance of a program.
- Technically, a process is any execute file held in storage on your machine. Anytime you run a program, you have created a process.
- A process is task that your Lunix machine is currently working on.
For example, when you open a browser, your machine create a process for it.
Process States
1. Running
The process is currently executing on the CPU.
2. Ready
3. Sleeping
The process is waiting for resource to become available.
4. Stopped
The process has been terminated by a user
6. Zombie
The process has completed execution but has not yet been cleaned by he system.
Process Management
1. ps - it will displays the currently-running processes.
- ps
- ps aux
u-represent the user/owner
x-display process executed outside of the terminal
it also display some extra fields in results.
2. top - to track running processes on your machine.
It will displays a list of processes that are running in real-time along with their memory and CPU usage.
3. kill- to stop a process in Linux, 'kill' command is used. kill command sends a signal tot he process.
- there are different types of signal to send. however, the command one is 'kill -9' which is 'SIGKILL'. This command is used in case the process ignores a normal kill request.
- kill -L will list all the signal.
- kill <PID> syntax for killing a process
- sudo systemctl status
- sudo systemctl start
- sudo systemctl stop
- ifconfig
- ip
- traceroute
- tracepath
- ping
- netstat
- ss
- dig
- nslookup
- route
- host
- arp
- iwconfig
- hostname
- curl or wget
- mtr
- whois
- ifplugstatus
- iftop
- tcpdum
- it stands for interface configuration.
- It is used to initialize an interface, configure it with an IP address, and enable or disable it. It is also used to display the route and the network interface.
- This is latest and updated version of ifconfig command
- ip i
- ip addr
- It is one of the most useful command in networking. It is used to troubleshoot the network.
- It detacts the delay and determine the pathway to your target
- It provide the names and identifies every device on the path
- It follow the route to the destination
- It determine where the network latency comes form and reports it.
- It is similar to traceroute command. It is used to detect network delays. However, it doesn't required root privileges.
- It is installed in Ubuntu by default
- It traces the route to the specified destination and identifies each hop in it.
- If network is weak, it recognize the point where the network is weak.
- Is one one of the most used network troubleshooting commands.
- It checks for the network connectivity between two nodes.
- ping stands for Packet Internet Groper
- The ping command sends the ICMP echo request to check the network connectivity.
- It refers to network statistics.
- It provides statistical figure about different interface which include open sockets, routing tables, and connection information.
- UFW, or Uncomplicated Firewall, is designed to make iptables firewall configuration more user-friendly. Originating from Ubuntu, it has been adopted by many other distributions due to its simplicity and ease of use.
- sudo ufw status
- sudo ufw enable
- sudo systemctl start firewalld
- sudo systemctl enable firewalld
- sudo systemctl stop firewalld
- sudo systemctl disable firewalld
Comments
Post a Comment