Category: General

  • Configure Linux Static IP Network Interface

    Static IP configuration can be found in file /etc/network/interfaces. This applies to Debian or any derivatives such as Ubuntu.

    Edit the file /etc/network/interfaces using sudo command

    sudo pico /etc/network/interfaces

    Change the file content to be similar like below. Please ensure to look closely on iface eth0 section. You can change the IP address based on your preferred address.

    [code language=”bash”]# The loopback interface
    auto lo
    iface lo inet loopback

    # Configuration for eth0 and aliases

    # This line ensures that the interface will be brought up during boot.
    auto eth0

    # eth0 – This is the main IP address that will be used for most outbound connections.
    # The address, netmask and gateway are all necessary.
    iface eth0 inet static
    address 192.168.1.10
    netmask 255.255.255.0
    gateway 192.168.1.1[/code]

    In case if you want to configure static IP in any virtual machine such as VirtualBox, you may need to adjust dns-nameservers manually
    [code language=”bash”]iface eth0 inet static
    address 192.168.1.10
    netmask 255.255.255.0
    dns-nameservers 192.168.1.1
    gateway 192.168.1.1
    [/code]

  • How to Disable Root Login in Ubuntu

    It is better to disable root user login since allowing root user login is a major security concern in Linux system. You can use root login after logging in as another user.

    1. Edit sshd_config file.

    sudo pico /etc/ssh/sshd_config

    2. Search PermitRootLogin directive in that file and change PermitRootLogin to no. Example:

    # Authentication:
    LoginGraceTime 120
    PermitRootLogin no
    StrictModes yes
    
  • How to Install Security Updates in Ubuntu

    You should install all available security updates in order to protect against unauthorised access to your Linux/Ubuntu box. The commands can be found in the following.

    sudo apt-get update
    sudo apt-get upgrade --show-upgraded
    

    Please ensure to enter your root password since you are using sudo command that gains super access to your Linux system.

  • Should you have breakfast before traveling?

    P1010273

    The answer is definitely yes, because breakfast will give you energy to do your daily activities, especially when you are traveling you need more energy, you must stay healthy.

    For breakfast you must balance your diet, it is better to have diversification. You don’t have to eat a lot of food but you must eat healthy food with a right combination.

    You could have toast, omelet, cheese, backed potatoes, tomato, green vegetable, smoke beef and drink milk or orange juice plus a cup of coffee or tea will be good for breakfast.

    Some people ignoring breakfast, they just simply drink coffee and smoke cigarettes and will eat during the lunch time because he won’t feel sleepy, actually those people’s opinion are totally wrong.