AKZN Notes

Archives for My Lazy and Forgetful Mind

Tag: Linux

How to Set Timezone Permanently on Ubuntu to UTC+7 (Indochina Time, ICT)

Introduction: Setting the correct timezone on your Ubuntu system is crucial for accurate timekeeping and proper synchronization. In this article, we will guide you through the process of permanently setting the timezone to UTC+7 (Indochina Time, ICT) using the timedatectl command. Step 1: Open a Terminal Open a terminal on your Ubuntu system. You can […]

How to deploy golang API backend

Step-by-Step Guide: Deploying a Golang API Backend on a Linux Server Prerequisites: You have a Golang API project ready. You have access to a Linux server. Apache is installed and properly configured on the server. Deployment Steps: 1. Check the .env File: Ensure your Golang project has a properly configured .env file containing all the […]

Using Rclone to sync file to Google Drive on Ubuntu

As of now, Google has yet to release an official backup/sync client for Linux. The following write-up describes an approach for using an open source package, rclone, to automate backups from Linux to Google drive. Download/install rclone: To download/install rclone: $ cd $HOME $ curl https://rclone.org/install.sh | sudo bash … rclone v1.53.1 has successfully installed. […]

[ubuntu][xrandr] Autodetect Display

cant get to work, use autorandr instead https://github.com/phillipberndt/autorandr config file on ~/.config/autorandr/ just in case some error(like what happened to me), just edit some parameter on those files that make errors, taken from https://unix.stackexchange.com/a/11891 with fix and personal customization I’m using this simple (homemade) script that keeps polling RandR and switches between LVDS1 and VGA1 […]

Deploy Laravel Project to Hosting or VPS

Deploy to CPanel Clone git to cpanel Taken from https://dashboard.webhostingmagic.com/knowledgebase/242/How-To-Clone-A-Private-Github-Repo-To-A-cPanel-Server.html Git private repository requires SSH access. So you must ensure that your hosting package has SSH enabled (customers on Web Hosting Magic need not worry as every hosting package comes with SSH access) and perform additional steps in order to successfully clone a privately-hosted remote […]

fix failed install python package

fix failed install python package problem pip installs packages successfully, but executables not found from command line solution echo "export PATH=\"`python3 -m site –user-base`/bin:$PATH\"" >> ~/.bashrc source ~/.bashrc

Linux Common Command

Linux Common Command show port sudo netstat -tuln Copy File/Folder cp cp -a /source/. /dest/ If you want to copy content of folder. If you want to copy folder content and parent, remove [dot] rsync rsync -r –progress /source/. /dest/ same with cp, but copy only the files that have changed Mount/Unmount USB/removable drive mount […]

Keep Processes Running After Ending SSH Session

Problem Let’s say I launch a bunch of processes from a ssh session. Is it possible to terminate the ssh session while keeping those processes running on the remote machine? Solution 1. Using built-in bash command For new task nohup nohup long-running-command & It was made specifically for this, it even logs stdout to nohup.log. […]

Installing and managing LAMP Webserver

Install LAMP Automatic i’m not suggesting this because more often than not i got error instlalation. Run the below command in terminal: php latest wget –no-cache -O – https://raw.githubusercontent.com/akzn/lamp-stack-install/main/lamp-install.sh | bash php 7.4 https://github.com/akzn/lamp-stack-install/blob/main/lamp-stack-install-php7.4 low spec device my suffer slow install or hang if using automatic install Manual php 7.4 follow https://github.com/akzn/lamp-stack-install/blob/main/lamp-stack-install-php7.4 then change mysql […]