How to find out Raspberry Pi GPU and ARM CPU temperature on Linux

You can find out the temperature of the GPU and ARM CPU on a Raspberry Pi running Linux by using the vcgencmd command. To display the GPU temperature: vcgencmd measure_temp To display the ARM CPU temperature: cat /sys/class/thermal/thermal_zone0/temp The output will be in Celsius. To convert to Fahrenheit, multiply the temperature by 9/5, and add … Read more

How to configure Nginx with Let’s Encrypt on Debian/Ubuntu Linux

Here’s a high-level overview of the steps to configure Nginx with Let’s Encrypt on a Debian or Ubuntu Linux system: Install Nginx: sudo apt-get update sudo apt-get install nginx Install certbot, the Let’s Encrypt client: sudo apt-get install certbot python3-certbot-nginx Obtain an SSL certificate for your domain: sudo certbot –nginx -d example.com -d www.example.com Replace … Read more

How to copy permissions from one file to another on Linux

You can copy the permissions from one file to another using the chmod command with the –reference option on a Linux system. The following command will copy the permissions from the file reference_file to the file target_file: chmod –reference=reference_file target_file This will set the permissions of target_file to be exactly the same as those of … Read more

Check Debian/Ubuntu Linux package version using apt-get/aptitude command

You can use the following command to check the version of a specific package installed on a Debian or Ubuntu Linux system using the apt-get command: apt-cache policy package_name Alternatively, you can use the following command to achieve the same result using the aptitude command: aptitude show package_name In both commands, replace package_name with the … Read more

Unix / Linux: Remove duplicate lines from a text file using awk or perl

You can use the following command to remove duplicate lines from a text file using awk: awk ‘!seen[$0]++’ file.txt > file_without_duplicates.txt Alternatively, you can use the following command to achieve the same result using perl: perl -ne ‘print unless $seen{$_}++’ file.txt > file_without_duplicates.txt These commands will read the contents of file.txt line by line and … Read more

How to install mysql server 5.7 on Ubuntu 16.04 LTS ( Xenial Xerus )

To install MySQL 5.7 on Ubuntu 16.04, follow these steps: Add the MySQL repository to the system: wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb Update the package list: sudo apt-get update Install the MySQL server package: sudo apt-get install mysql-server-5.7 Start the MySQL service: sudo systemctl start mysql Verify the MySQL installation: mysql -u root -p … Read more