Try โ€‚โ€‰HackMD

Linux & Networking Basics

System Design

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More โ†’

1. RHEL Local Instalation ๐Ÿง‘โ€๐Ÿ’ป

  1. Download the related image (in this case RHEL 9)

    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More โ†’

    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More โ†’

  2. Import the iso and config like this following picture:

    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More โ†’

  3. SSH the network enp0s3 interface

    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More โ†’

2. RHEL Basic Command โŒจ๏ธ

  1. Navigating Path

    • Current Path

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      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 Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      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 Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      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 Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      Then I add a new file named Dockerfile which contains nothing inside.

    • Edit File

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      We can edit the Dockerfile using vim text editor.

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

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

    • Copy File

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      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 Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      We also can move the Dockerfile.bak in ~/docker directory to current dir which is ~/docs.

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      This command also can used to change the filename.

    • Remove File

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      Delete the backups file and see the result.

  3. Directory Management

    • Create Directory

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      We can create new directory named anything except this.

    • Copy Directory

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      We can copy the entire existing docs/ directory to kube/.

    • Move Directory

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      Also we can move the entire existing docs/ directory to docker/.

    • Remove Empty Directory

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      If the directory is empty just simply use command above.

    • Remove Directory

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      If the directory is filled with files, execute it with -r option stands for recursive.

  4. User & Group Management

    • User Creation

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      We can create the user in the same machine. In this case is king and configure the password with command below.

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

    • Group Creation

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      Then we can add the user to the group for make the permission management to directory or file is easier.

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

  5. File Permission

    • Change File Permission

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      As you can see from here, the code.sh file is just have a read permission.

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      We can change it to make the file executable by the +x operation.

    • Change Directory Ownership

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

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

  6. Process Management

    • Listing Process

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      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 Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      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 Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      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 Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

    • Monitoring Process

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

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

  7. Service & Daemon Management

    • Service Status

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      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 Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      In this direc

3. RHEL Networking ๐Ÿ›œ

  1. Basic Network Display

    • Displaying IP Address

      Image Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      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 Not Showing Possible Reasons
      • The image was uploaded to a note which you don't have access to
      • The note which the image was originally uploaded to has been deleted
      Learn More โ†’

      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

      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

      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

      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

      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

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

      image

4. Bridge Network ๐Ÿ“ฒ

  1. Configure Bridge Network Interface
    • Create Bridge Interface named br0

      image

      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

      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

      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

    • Test if the new bridge network is properly configured

      image

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

      image