Tag: command line
-
Clone an app with Azure PowerShell
Create an exact copy of an existing app including files using PowerShell. Azure portal provides an option to create additional deployment slots for your app to use for staging. This creates a copy of your app which you can publish to for testing and when you’re ready, swap this slot with the production slot. This…
-
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…
-
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…
-
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…
-
MySQL user management from the command line
If phpMyAdmin is not installed on your server or if you don’t have access to it but instead have shell access, you can easily manage your MySQL database users from the command line. MySQL stores the list of users in the mysql.user table. List of all databases are stored in the mysql.db table. Show list…
-
Export / Import a MySQL database between remote server and local machine
Upload or download a MySQL database between a remote server and localhost using the Linux command line. Download a remote MySQL database Download a remote MySQL database using mysqldump dump. The output of the dump is compressed using gzip. This compressed file is then unzipped and downloaded into the file remotedb.sql. Copy local database to…
-
Create a new MySQL user from the command line
Create and add a user to a MySQL database using the command line. Run MySQL Open MySQL using the below command. The username should be your root user or an admin user with access for creating other users. Create a database and a user Create a new database (if required) and create a new user.…
-
Enable syntax highlighting for nano on macOS Catalina
The default version of nano that is installed on a mac most likely does not support syntax highlighting. To check your version run: You will need to upgrade it using a version from Homebrew. If you don’t have Homebrew, then you can install it easily. Think of Homebrew like a command line based AppStore. To…
-
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…