Snippets.page

Code snippets, tips, how-tos

Tag: linux

  • Install Pi-hole on WSL2 and use externally with Tailscale

    Use your devices with Pi-hole when not connected to your LAN. Pi-hole is normally configured on your router or on a separate device on your LAN (e.g., Raspberry Pi) so that all devices connected to your LAN (Wi-Fi) can use it. But this doesn’t help when you’re not connected to your home network. To use […]

    Read more

  • Install Nextcloud on WSL2 and access anywhere with Tailscale

    Install Nextcloud on WSL2 and access anywhere with Tailscale

    Installing Nextcloud on WSL2 Nextcloud requires Apache server, PHP and MariaDB to run. You can install the required packages using the Linux package manager in WSL2. This guide assumes that you have Ubuntu installed on WSL2 but the steps are the same for other distros, only the installation commands will differ. Install the required LAMP […]

    Read more

  • Install Tailscale on WSL2

    Install Tailscale on WSL2

    Tailscale is your own personal VPN that opens up a lot of possibilities. A private VPN gives you access to all your devices even when you’re not connected to the same local network. Tailscale gives your device a “static” IP that you can use to connect to it from anywhere. This lets you set up […]

    Read more

  • Check disk usage in Linux command line

    View total disk usage Disk free space can be checked in the Linux command line using the df and du commands. df stands for disk free. du stands for disk usage. The -h flag stands for human. It shows the sizes in human readable formats like MB or GB instead of bytes. Disk usage by […]

    Read more

  • Fix PHP executable not set in VSCode when running XAMPP on Linux

    This is a fix for the following error when opening PHP files in VSCode or VSCodium: Cannot validate since no PHP executable is set. Use the setting ‘php.validate.executablePath’ to configure the PHP executable. This error means that VSCode does not know how to validate the contents of a PHP file and can’t show errors in […]

    Read more

  • Check PC Config using the Linux command line

    View hardware and other details from the command line. View Hardware Details View Network Details

    Read more

  • Zim vs Joplin

    Comparison of note-taking apps for Linux. Zim and Joplin are note-taking apps that are available for Linux. I’ve been using Joplin for a while now to take notes and it works fine. I wanted to try a new notes app for Ubuntu (I’m using Lubuntu Desktop) and found Zim. Some thoughts below on how it […]

    Read more

  • Change the file upload size in NGINX

    When you have a PHP-based website like WordPress running on NGINX, you would typically change the maximum file upload size in PHP settings e.g., in php.ini file or similar. NGINX web server also has it’s own configuration where you can set the max upload size server-wide. This is set in the .conf file using the […]

    Read more

  • Dual boot Zorin OS and Windows 10

    Zorin OS is a user-friendly version of Linux that you can install and try if you are new to Linux. Download the Zorin OS .iso file Create a bootable USB (Installation USB) from the .iso file using balenaEtcher Plugin the USB and restart Windows Go to boot menu when Windows is restarting. Press F12 until […]

    Read more

  • Get a Let’s Encrypt SSL certificate for your domain

    Install a free SSL certificate and serve your site with “https”. Let’s Encrypt provides free SSL certificates and with the help of the installation tool called Certbot, you can easily enable an HTTPS certificate for your website. These instructions are for users running either Nginx or Apache on Ubuntu server and have access to the […]

    Read more