Connect to Wifi with nmcli

First check if the Wi-Fi device is enabled or not: $ nmcli radio wifi If the output shows that the Wi-Fi is disabled, then it can be enabled with: $ nmcli radio wifi on If we already know the access point, then skip the following step. Otherwise, to identify the access points, run: $ nmcli dev wifi list Supposed we want to connect to the access point named ’totoro’, and the password is ’t0t0r02023’, we can connect to it by running the following command: ...

July 23, 2023 · 1 min · 151 words · kenno

Changing Permalink in Hugo

This post is related to the previous one about changing a theme in Hugo. After I changed the theme to “PaperMod”, I realized that each article or blog post is under ‘post/date’ URL path. For example, the following is the permanent link/path of a post: https://blog.khmersite.net/post/2023/06/changing-hugo-theme/ Previously, there was no word post in the URL path, and I still want it gone again with this new theme, as below. https://blog.khmersite.net/2023/06/changing-hugo-theme/ The problem is, I forgot how it was done! ...

July 15, 2023 · 1 min · 147 words · kenno

Changing Hugo Theme

Had you visited this blog recently, you may have noticed that the blog’s theme has changed. Here is a quick note on how I changed the theme of this blog from cayman-hugo-theme to PaperMod. For a little background, Hugo themes are installed as git submodule. Want a quick recap on how to use Git Submodule? Here is a good content [0]. First, the current theme needs to be removed: $ git submodule 4a924cef54081b61530a30bd69d442ae99916561 themes/cayman-hugo-theme (heads/master) $ git submodule deinit "themes/cayman-hugo-theme" $ git rm "themes/cayman-hugo-theme" $ git commit -m 'remove theme cayman-hugo-theme' Add a new theme, PaperMod [2] as the submodule. $ git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod $ git add .gitmodules $ git add config.yml $ git commit -m 'change theme to PaperMod' $ git push Note: As each Hugo theme contains specific parameters, I also had to update the config.yml required by this new theme. A copy of a sample config.yml is available at the theme’s exampleSite [1]. ...

June 20, 2023 · 1 min · 173 words · kenno

How to find EC2 instance ID from a known private IP using AWS CLI

When I first started to use AWS CLI, I felt overwhelmed, and I wondered how long it would take me to be familiar with the tool. Fast forward to many months later, I find the AWS CLI very pleasant to use. For example, there are same patterns and the CLI reference page online is quite useful. Anyway, like many thing I’ve learned about Linux, I learned and could retain the information better with practice and document. So, I’m gonna just dump the commands that I need and learn here to help my future self should I need to find the same commands. ...

May 26, 2023 · 1 min · 208 words · kenno

How to Zip a file using command line

I normally use gzip for file compression. However, there is time when you want to share a compressed file with Windows users and you want to avoid them cursing at you. One good solution is to use zip compression (even if I had to learn how to do it on a Linux machine). Well, like always we can run man zip to learn more about it, but since you’re reading this, it is unlikely that you’re doing that. So, here is how you can do it. ...

May 22, 2023 · 1 min · 141 words · kenno