The best programming blog.

Covering a wide array of programming topics.

How to install MySQL on MAC

Download and install MySQL dmg. Keep note of the root user password and save it in a secure place. The installation will be done at mysql-8.0.27-macos11-x86_64 A sym link will automatically be created at /usr/local/mysql Creatye a new symlink at /usr/local/bin path so that we can access mysql by typing mysql command at the terminal: ln…More

How to install PHP on MAC

Run brew update command brew update If the Homebrew is not installed then you can install it from https://brew.sh/ Run brew install php@7.4 command to install PHP brew install php@7.4 Run the following command to restart the PHP service brew services restart php@7.4 Output: Successfully started `php@7.4` (label: homebrew.mxcl.php@7.4) Run the following command to create…More

How to check PHP version on Ubuntu

Run the following command to get the version of PHP installed on Ubuntu machine: The output should look like this: PHP 7.4.3 (cli) (built: Mar 2 2022 15:36:52) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies Above, 7.4.3 is…More

How to increase hard disk size of Ubuntu EC2 Instance

Verify the existing hard disk space Verify your root partition to see how much hard disk space is left. In this example, we will be increasing the hard disk space from 8 GB to 30 GB. Run the df -h command to get the availaible space in your system: df -h Filesystem Size Used Avail…More

Remove all folders starting with a string in Ubuntu

Following command can be used in the terminal to remove all the folders/directories starting with a string. rm -rf /<YourParentFolderLocatiion>/<StringStartingWith>*/ Example: rm -rf /tmp/deleteme*/ Above, all the folders starting with deleteme string will be deleted inside the /tmp folder location.More

jq: command not found Ubuntu

Run the following command to fix that: The output should look like this: Reading package lists… Done Building dependency tree Reading state information… Done The following additional packages will be installed: libjq1 The following NEW packages will be installed: jq libjq1 0 upgraded, 2 newly installed, 0 to remove and 45 not upgraded. Need to…More

Unable to locate executable file: ‘mono’ Azure Deveops Pipeline

Error: ##[error]Error: Unable to locate executable file: ‘mono’. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable. ##[error]Packages failed to restore The solution is to install mono on Ubuntu. The steps…More

Install mono on Ubuntu

Run the following commands to install mono sudo apt update sudo apt install dirmngr gnupg apt-transport-https ca-certificates software-properties-common sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF sudo apt-add-repository ‘deb https://download.mono-project.com/repo/ubuntu stable-focal main’ sudo apt install mono-complete Progress will look like this Confirm if the package is installed by running the following command: apt -qq list mono-complete…More

How to check if a package is installed on Ubuntu

Run the following command to get the list of all the services which are running or are in active state apt -qq list <packagename> Example: apt -qq list zip where zip is the package name in the above command. The output should look like this: zip/focal,now 3.0-11build1 amd64 [installed]More

How to check all the services running in Ubuntu

Run the following command to get the list of all the services which are running or are in active state: The output should look like this: UNIT > accounts-daemon.service > acpid.service > apparmor.service > apport.service > atd.service > blk-availability.service > cloud-config.service > cloud-final.service > cloud-init-local.service > cloud-init.service > console-setup.service > cron.service > dbus.service > finalrd.serviceMore