Skip to main content

Posts

Showing posts from 2026

Linux find up interfaces

If a Linux box VM, WSL or a physical server is unable to connect to Network, one possible issue is the network interface is not UP. Typing:   ip address show   Or:   ip a s  The output will show which interfaces are UP. If the output shows like:  eth0: <BROADCAST, MULTICAST, UP, LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 UP after multicast means that the interface is not disabled on the OS or administratively enabled LOWER_UP means that a cable is connected  and is able and is able to find an active switch port  Running this command below: tcpdump -D The output will also show that the interface is Up, Running and connected. Example: 1. eth0 [Up, Running, Connected] Basic commands that will help to save the day if ever there is some network or connectivity issues. That's it.. till next time. Stay close to Jesus, you will find comfort and amazing peace. All you need is to surrender wholeheartedly whatever you're going through.

HAProxy cannot bind port not listening

HAProxy is an open-software used as a high-performance load balancer and reverse proxy for TCP. To check whether the proxy config before reloading or restarting the HAProxy service can be done via this command:  haproxy -c -f /etc/haproxy/haproxy.cfg It will show 'configuration file is valid' if everything is okay or the config file syntax is valid. However, the command cannot check whether it can bind the port, or bind the socket. Example, typing: systemctl reload haproxy to reload the new config file. And to check whether the reload is successful or not status of the service can be checked. Typing, systemctl status haproxy to check the status and if it shows Reload: failed then binding issues or other errors causes reloading to fail. Or some alert is shown as Binding like /etc/haproxy/haproxy.cfg cannot bind socket or cannot assign requested address for 192.168.x.x. IP Technically, the error is already giving some hints that the IP on the HAProxy config file cannot be used fo...

Practice Linux vim in Windows using gVim

Vim is a cool and powerful editor in Linux system. It is also available for Windows via this download page: https://www.vim.org/download.php Choose: gvim_9.2.0000_x64.exe (64bit installer) or any format of your choice. After downloading and installing, the installer it will create two desktop icons; something similar to the image shown below. Why there are two icons? As the name suggests "gVim Easy 9.2", gVim Easy is the filename suggests it's "easy", upon opening or clicking the icon it will open gVim in "insert" mode and start typing immediately. While the other icon "gVim Read only 9.2", upon clicking or opening this icon. This will open gVim on "read only" as it names suggest. It's quite good if you only need to review or read the file. However, it says "read only" it doesn't mean that you cannot edit, modify or add text to the file. While inside "gVim Read only", press "insert" key or pre...

PowerShell/Bash Linux get MAC address

Example of PowerShell get MAC address: getmac /s 127.0.0.1 | findstr /I TCPIP Sample output: C4-75-CB-37-BB-BF \Device\Tcpip_{7F29EDBA-C045-4C74-834E-F026BCE8169B} For Linux: ip a | grep -i "link/ether" | awk '{print $1, $2}' Sample output: link/ether 00:15:5d:98:16:36 That's it a quick way, to find MAC address. Ideal for network switch troubleshooting. Pray, hope and don't worry. Always Be Still, God is always in control. Consult God by praying.

Newly built Linux box cannot SSH

Fully functional and brand new built VM, Physical server, Container or any boxes with Linux distro, however, SSH is not working. Newly built Linux boxes with Server OS, the SSH service or remote access to the box won't start functioning even though the server is up and running. For the SSH to start it needs to have the required SSH keys for the service to start. The solution is to run this command: ssh-keygen -A After typing the command, try systemctl start ssh or systemctl start sahd Also check the status by: systemctl status ssh / systemctl status sshd And also good idea to start SSH once the system is restarted. Type: systemctl enable ssh / systemctl enable sshd Once the service or status of the SSH is confirmed running, then the system or device can connect remotely or other devices can connect to the local system as well. That's it, till next time. Enjoy exploring the Linux World! Prayer connect us to God, line is never congested! Have Faith and Trust Jesus, He always do g...

Linux check internet connection

Setting up any system, laptop, desktop, server, virtual machines or containers one of the requirements is for the device or machine to be able to connect to other systems or other networks like the internet. And having a working gateway, as it.is called in networking is the key that the machine is able to connect to ther internet or other devices. In Linux, a simple command type on the terminal like: - ip r  - or type the whole command: ip route This will show a message something like: default via 192.168.1.1 dev eth0 proto kernel 192.168.1.1 is the gateway IP address and if.everything is in place correctly then the system can connect to internet. Other way to verify via command line is to type: $ ip route get 8.8.8.8 Which will show an output like: 8.8.8.8 via 192.168.1.1 dev eth0 sec 192.168.1.24 uid 1000    cache Shows that packet destined for 8.8.8.8 will be routed via the gateway 192.168.1.1 Source IP will be 192.168.1.24 and UID 1000 is the id of the user executing ...

Linux variables to get UID/GID

User ID(UID), GID (Group ID) in Linux are numerical identifiers to set access to files, directories and system resources, just like rwx which in octal equivalent is r=4, w=2, x=1 and the desperate permission which will equal to 777.  777 is quite useful when nothing is working and an easy way out but yes use sparingly. UID and GID can be used also to restrict permissions or access. Quite a few ways to get UID value for the current login user. At terminal typing: echo "$UID" id -u echo/run/user/$UID All commands above are the same, get the user id of the currently logged in user. To get the GID, or the group membership of the currently logged in user is quite straight forward, at terminal type: id The output will be the  group-id(name of the group) and those are the group membership of the currently logged in user. id -Gn will just list the groups without the GID. id -G will just list the GIDs without name group Another quite useful variable, if let's say someone is asking...