IPv4 Datagram Format – Encapsulation Visualized

IPv4 is not only the IP address of a device.It is a fundamental network-layer protocol used for addressing and routing packets across the Internet. Here is the format of an IPv4 datagram, where 32 bits means every IPv4 header is organized into rows of 32 bits wide. The IPv4 header is organized into 32-bit words

BASH script tracing by -x

Very useful option which allows to trace the execution of a bash script. You can add the -x option directly to the shebang: Or, for better portability, you can leave the shebang standard and enable tracing with set -x inside the script: We can test it by applying it to a simple bash script and

How to check the error of every command?

Answer: How it works? If you put a command into your terminal, and after that you haven’t gotten any info about it, then you can check it using echo $?. For example: In the output, the terminal doesn’t show any info about the status. We can check this: In the output we will see 0

Source Code – The Recipe for Your Meal

Source code is nothing other than ordinary code written by a programmer in a specific language like Python .py, C++ .cpp or low-level C, which can be written using .c and .h extensions. Here is an example of a simple code written in C using .c, .h and Makefile. Compiling If we talk about low-level,

Create BACKUP of Linux Files Before Editing

Before editing any important file, the best practice is to create a backup of it. The extensions “.bak”, “.sav”, “.old”, and “.orig” are all popular ways of indicating a backup file. So, create the simplest backup using .bak: Now, if we run ls, we can see that .bashrc.bak appears slightly dimmed: If you need to,

Ubuntu’s own command – Linux IP configuration (like Windows’ ipconfig)

It’s a bit annoying that after using the ip a command, we see unreadable mojibake. Without a doubt, Windows ipconfig shows more readable info about the device’s IP configuration. However, it is possible to display readable IP configuration information in Ubuntu as well. To do this, we need to create our own script. The output

TCP Socket Simulation in python

GitHub code click here! A simple TCP client-server communication example demonstrating bidirectional socket communication in Python. Project Description This project consists of two Python scripts that implement a basic TCP socket communication system: How It Works TCPServer.py The server performs the following operations: TCPClient.py The client performs the following operations: Important: Server IP Configuration The

A simple UDP client-server communication program in python

GitHub code click here! A simple UDP (User Datagram Protocol) client-server communication program that converts messages to uppercase. Overview This project demonstrates basic UDP socket programming with a server that listens for incoming messages and converts them to uppercase, and a client that sends messages to the server and receives the modified response. Files Usage