---
# System prepended metadata

title: 'Probation: Linux & Networking Basics'
tags: [Probation]

---



# Linux & Networking Basics

## System Design

![System Design Testt.drawio(2)](https://hackmd.io/_uploads/SJgk9rWcV6.svg)


### 1. RHEL Local Instalation 🧑‍💻
1. Download the related image (in this case [RHEL 9](https://developers.redhat.com/products/rhel/download#rhel-new-product-download-list-61451))
     ![image](https://hackmd.io/_uploads/Hk01ipZHp.png)
     
     ![image](https://hackmd.io/_uploads/BJuxcabSp.png)
    


3. Import the iso  and config like this following picture:
![image](https://hackmd.io/_uploads/S1kbRUeEp.png)
3. SSH the network `enp0s3` interface
![image](https://hackmd.io/_uploads/SykIJvgET.png)

### 2. RHEL Basic Command ⌨️

1. **Navigating Path**
    * Current Path 
    
        ![image](https://hackmd.io/_uploads/ry9VWDgVp.png)
        
        As you can see from here, my relative current path is `/home/rafli`. From here you can know what directory you're in which is home dir.
    * Listing File and Directory

        ![image](https://hackmd.io/_uploads/ryVqZvxVT.png)
        
        In this directory the only directory exist is `/docs`. Other that that is the default file that uses for my bash shell configuration. 
    * Change Directory

        ![image](https://hackmd.io/_uploads/By9LlCl4a.png)
        
        From home directory we chage to the docs directory. After we list what's in it, there is `conf.txt` file which are different from home dir.

2. **File Management**
    * Create File 
    
        ![image](https://hackmd.io/_uploads/HJKGZCx4p.png)

        
        Then I add a new file named `Dockerfile` which contains nothing inside. 
    * Edit File

        ![image](https://hackmd.io/_uploads/S12CbAlNp.png)

        We can edit the `Dockerfile` using vim text editor.
        
        ![image](https://hackmd.io/_uploads/rkUTbClV6.png)

        
        After the configuration is finished, it can be saved and see the file by `cat` command.

    * Copy File 
    
        ![image](https://hackmd.io/_uploads/BJLaGAg4a.png)

        
        We can copy what's inside the Dockerfile configuration to some other file directory. In the example above we copying the file to `~/docker/Dockerfile.bak`.
    * Move File

        ![image](https://hackmd.io/_uploads/HybLXAeET.png)
        
        We also can move the `Dockerfile.bak` in `~/docker` directory to current dir which is `~/docs`. 
        
        ![image](https://hackmd.io/_uploads/HkaOmRgEp.png)

        This command also can used to change the filename.
        
    * Remove File

        ![image](https://hackmd.io/_uploads/S16aNCgVa.png)
        
        Delete the backups file and see the result.
    
3. **Directory Management**

    * Create Directory
    
        ![image](https://hackmd.io/_uploads/H1dJ3zXNp.png)
        
        We can create new directory named anything except [this](https://stackoverflow.com/questions/1976007/what-characters-are-forbidden-in-windows-and-linux-directory-names).
    * Copy Directory

        ![image](https://hackmd.io/_uploads/SJou2zXNT.png)
        
        We can copy the entire existing `docs/` directory to `kube/`. 
    * Move Directory

        ![image](https://hackmd.io/_uploads/Hkf0nMQVa.png)
        
        Also we can move the entire existing `docs/` directory to `docker/`.
    * Remove Empty Directory
    
        ![image](https://hackmd.io/_uploads/SJs-afX4a.png)
        
        If the directory is empty just simply use command above.
    * Remove Directory

        ![image](https://hackmd.io/_uploads/BkREpzXET.png)
        
        If the directory is filled with files, execute it with `-r` option stands for recursive. 


4. **User & Group Management**
    * User Creation
    
        ![image](https://hackmd.io/_uploads/Sk90Jm7NT.png)
        
        We can create the user in the same machine. In this case is king and configure the password with command below.
        
        ![image](https://hackmd.io/_uploads/HJ0xx77VT.png)

    * Group Creation

        ![image](https://hackmd.io/_uploads/SJmug7XNa.png)

        Then we can add the user to the group for make the permission management to directory or file is easier.
        
        ![image](https://hackmd.io/_uploads/BJtLWQQEa.png)


5. **File Permission**
    * Change File Permission
    
        ![image](https://hackmd.io/_uploads/BklDQEmNp.png)
        
        As you can see from here, the `code.sh` file is just have a read permission.
        
        ![image](https://hackmd.io/_uploads/SyB57VX46.png)

        We can change it to make the file executable by the `+x` operation.
    * Change Directory Ownership

        ![image](https://hackmd.io/_uploads/ByxoNE7Va.png)

        Then to change the ownership we can simply use the command above. 

6. **Process Management**
    * Listing Process
    
        ![image](https://hackmd.io/_uploads/H1TgrVQ4T.png)
        
        As you can see from here, my relative current path is `/home/rafli`. From here you can know what directory you're in which is home dir.
    * Background Jobs

        ![image](https://hackmd.io/_uploads/H1J9HEQN6.png)

        In this directory the only directory exist is `/docs`. Other that that is the default file that uses for my bash shell configuration. 
    * Killing Process
    
        ![image](https://hackmd.io/_uploads/HkoMUEQ46.png)
        
        As you can see from here, my relative current path is `/home/rafli`. From here you can know what directory you're in which is home dir.
        
        ![image](https://hackmd.io/_uploads/HJUSU47Ep.png)

    * Monitoring Process

        ![image](https://hackmd.io/_uploads/BJa2UVX4T.png)
        
        In this directory the only directory exist is `/docs`. Other that that is the default file that uses for my bash shell configuration. 
        
6. **Service & Daemon Management**
    * Service Status
    
        ![image](https://hackmd.io/_uploads/BJHkDEX4a.png)
        
        As you can see from here, my relative current path is `/home/rafli`. From here you can know what directory you're in which is home dir.
    * Control System Service

        ![image](https://hackmd.io/_uploads/rylVP4mN6.png)
        
        In this direc
        
### 3. RHEL Networking 🛜

1. **Basic Network Display**
    * Displaying IP Address
    
        ![image](https://hackmd.io/_uploads/SyE2D4XV6.png)
        
        As you can see from here, my relative current path is `/home/rafli`. From here you can know what directory you're in which is home dir.
    * Displaying IP Route

        ![image](https://hackmd.io/_uploads/BJ-bO474a.png)
        
        In this directory the only directory exist is `/docs`. Other that that is the default file that uses for my bash shell configuration. 
    * Displaying Socket Statistic
    
        ![image](https://hackmd.io/_uploads/SJbSu4X4a.png)

        
        As you can see from here, my relative current path is `/home/rafli`. From here you can know what directory you're in which is home dir.

2. **Change Network Interface with `nmcli`**
    * Listing Active Interface
    
        ![image](https://hackmd.io/_uploads/ryRmYEQ4a.png)
        
        As you can see from here, my relative current path is `/home/rafli`. From here you can know what directory you're in which is home dir.
    * Create New Connection Named `static-enp0s3`

        ![image](https://hackmd.io/_uploads/HyEbnEmVa.png)
        
        In this directory the only directory exist is `/docs`. Other that that is the default file that uses for my bash shell configuration. 
    * Configuring DNS
    
        ![image](https://hackmd.io/_uploads/BJH0s4XNp.png)
        
        As you can see from here, my relative current path is `/home/rafli`. From here you can know what directory you're in which is home dir.
    * Make the connection up and running

        ![image](https://hackmd.io/_uploads/H1ME647ET.png)
        
        In this directory the only directory exist is `/docs`. Other that that is the default file that uses for my bash shell configuration. 
        
        ![image](https://hackmd.io/_uploads/HJxEyBXEp.png)

        
### 4. Bridge Network 📲

3. **Configure Bridge Network Interface**
    * Create Bridge Interface named `br0`
    
        ![image](https://hackmd.io/_uploads/H1G9xSX4T.png)
        
        As you can see from here, my relative current path is `/home/rafli`. From here you can know what directory you're in which is home dir.
        
        ![image](https://hackmd.io/_uploads/By26SSX4a.png)
        
        As you can see from here, my relative current path is `/home/rafli`. From here you can know what directory you're in which is home dir.
        
    * Make the connection up and running
    
        ![image](https://hackmd.io/_uploads/HJ9SFSQEp.png)
        
        As you can see from here, my relative current path is `/home/rafli`. From here you can know what directory you're in which is home dir.
        
        ![image](https://hackmd.io/_uploads/rkcGFSQEa.png)

    * Test if the new bridge network is properly configured

        ![image](https://hackmd.io/_uploads/SJPqUrQ46.png)

        In this directory the only directory exist is `/docs`. Other that that is the default file that uses for my bash shell configuration.
        

        ![image](https://hackmd.io/_uploads/By9j8B7Np.png)


