Category: Linux

  • Internet Speed Testing from Command Line on Linux

    Most of us are quite familiar with speedtest.net and fast.com’s speed testing service. And also they both provided command line alternatives that are quite easy to install and follow. For speedtest.net, please see their official installation instructions: https://www.speedtest.net/apps/cli For fast.com, here is an tutorial that works fine for my instances: https://www.tecmint.com/fast-test-internet-download-speed-in-linux

  • How to Fix “Failed to connect to bus: No such file or directory” Error When Executing “hostnamectl” on Debian

    I bumped into this error when spinning up bitnami wordpress OVA VM in my EXSI hyppervisor when executing the command “hostnamectl”. The root cause is that the dbus package is not installed. To install the dbus package, use below command: $ sudo apt-get install dbus Then check two relevant services’ statuses using below: $ sudo…

  • How to Change Kali Linux’s Default User to Root in WSL

    After installing a couple of Kali distros in WSL in Windows, I often bumped into below error messages when I was trying to use sudo as a non-root user: Since this is an extremely anonying behavior, which seems to be typical only for the WSL version of Kali, I decided to use root as the…

  • How to Install Ubuntu on WSL2 without Microsoft Store

    Strangely, downloading Ubuntu from my Microsoft Store doesn’t work on my Windows 10 workstation (maybe due to corporate AD policy restrictions). Here is the workaround that I found out which can get the Ubuntu 20.04 installed on my WSL subsystem. Step 1: run powershll as “administrator” Step 2: run below command to see if you…

  • Unable to Log in WP Local APP on Windows 10

    WP Local (or Flywheel Local) has a fantastic functin of providing a “live link” for the wordpress site you are working on on you workstation to be viewable on a public internet link, which you usually need to show to your clients or colleagues. But I was not able to log into this APP on…

  • How to Install WordPress and PhpMyAdmin on a Ubuntu 20.04 Server

    There are many tutorials that can be found through Google. But I found the below two are the most reliable and replicable throughout my many trials. For WordPress installation, please click here. For PhpMyAdmin intallation, click here.  

  • Cannot SSH AWS EC2 Because of Being Locked Out by Enabled UFW

    OK, I know this is dumb, but I locked myself out of my AWS EC2 instance by enabling UFW before I whitelisted the port 22 rule. Luckily, I found this article which gives a full guide on how to successfully disable UFW in AWS’s instance startup script.

  • How to Restrict Samba Share Folder to Local Network Access Only on Ubuntu Server

    My Ubuntu server is running wild on public network and due to a previous setting on my firewall to let Samba traffic pass through, I had port 139 open to “any” network. And this can be seen from a common NMAP probe: Obviously exposing file sharing service is a bad idea and I used below…

  • Get Fail2ban Installed and Configured on Ubuntu Server

    I recently threw an old Dell laptop installed with Ubuntu Server into the DMZ of my home router/firewall. And since it is placed in the wild west of public internet now, it surely needs some extra protecion as the port 22 is quite vulnerable to brute force attacks. Therefore, the Fail2ban app comes to mind…

  • Reduce Mysql Service Memory Usage On A Centos Server

    I tried below settings to bring down Mysqld service memory usage from 450 MB to less than 300 MB on a very low performance hosting server on cloud. Code to b added in /etc/my.conf is below: [mysqld] table_definition_cache = 400 More research will be needed for me to know what exactly was optimized by this…