Browsed by
Category: Linux

Linux Process Creation

Linux Process Creation

New processes are created in Linux with a fork-and-exec mechanism. When a process makes a fork call, a new process with a new PID is created. The process that made the fork call is the parent process and the new process is the child process. The child process starts as a duplicate of the parent process, with some significant status changes. Both processes receive a value from the fork call. The parent process receives the PID of the child process…

Read More Read More

OpenSSL Generating Private and Public Key Pair

OpenSSL Generating Private and Public Key Pair

In this post I will create asymmetric encryption key pair and then demonstrate the encryption and decryption of sample test.txt file with Private and Public keys using OpenSSL in Linux 1. Generate 4096-bit RSA Private key and protect it with “secops1” pass phrase using 128-bit AES encryption and store it as private.pem file openssl genrsa -aes128 -passout pass:secops1 -out private.pem 4096 Encryption of private key with AES and a pass phrase provides an extra layer of protection for the key….

Read More Read More

Configure IP address on Ubuntu Linux from CLI

Configure IP address on Ubuntu Linux from CLI

Suppose we need to configure following IPv4 paratmeters: IP address: 10.10.10.1 Netmask: 255.255.255.0 Gateway: 10.10.10.254 First we need to identify our interface. Parameter “-a” command will show all interfaces even if they are down. ifconfig -a We will use interface ens160. Ip configurations needs to be done with super user privilages. Following command will set Ip and netmask: sudo ifconfig eth1 10.10.10.1 netmask 255.255.255.0 broadcast 10.10.10.255 Short form of the command could also be used. But it will set the…

Read More Read More

Linux (Unix) Permissions

Linux (Unix) Permissions

Today I will explain Linux permissions and how to modify them. Following pictures explain how its presented in cli Another good example taken from google First character represents the type of object in our case its file. In case of folders “d” is written instead of “-” Next 9 characters allocated to permissions 3 characters for each group. Thera 3 access types in Linux: r – read w – write x – execute We can check file permissions by issuing…

Read More Read More