Change/reset root password on raspberry pi

If you need to change/reset the root password on raspberry pi os (like after first boot), run this command

sudo passwd root

in your terminal. It will allow you to change the root password. You can then logout from the normal user, and log in as root user using the password you would have set while runninghte commnad listed above.

Be careful while using the root login on Raspberry Pi OS, or for that matter any Linux (or similar) OS, as it can lead to bricking your Pi.

Advertisement

Virtual machines on Apple Silicon Chip based machines (M1/M2 … ) … alternative to Virtualbox

If you are looking for a simple and reliable virtual machine that can run natively on Apple Silicon (M1/M2 …), and is also available for free (as of April 2023), check out UTM at https://mac.getutm.app/ .

For some reason, Virtualbox does not work reliably on Mac anymore, and my search led me to UTM app. It’s based on QEMU, an open source virtualisation platform available since long, providing a very convenient GUI to access the underlying VM software.

UTM is a simple and reliable virtual machine that run natively on Apple Silicon (M1/M2 …) chips, is available for free . Check out the UTM app at https://mac.getutm.app .

One drawback that it still has is the unavailability of snapshots, which in my view is very helpful in reverting back to a known/safe state. Though there is some work going on as per https://github.com/utmapp/UTM/issues/2688

Setting up a local web server on Mac OS Sierra

For setting up a simple web server running on Mac OS Sierra, the easiest way is to use the default apache web server that is supplied with the OS. Its disabled by default, so start it with sudo privileges.

$ sudo apachectl start

Similarly, to stop the web server use

$ sudo apachectl stop

Apache configuration file is located at /etc/apache2/httpd.conf which you will need to edit in sudo mode.  Webroot directotry is  located at /Library/WebServer/Documents.
To enable php, uncomment LoadModule php5_module libexec/apache2/libphp5.so line in the Apache configuration file.

Add new hard disk in Debian

To addd a new hard disk in debian from command line, look at this article:

http://www.debiantutorials.com/how-to-add-a-new-hard-disk-or-partition-using-uuid-and-ext4-filesystem/

It uses UUID to enable the hard disk which enables using the hard disk even when more hd are attached or some are removed from the system. For Debian Jessie (ver 8.x) users, there is an additional step to choose disk label type while partitioning the disk using cfdisk. To avoid any in-compatibilites, I would suggest  using the same disk label type as the one being used in your current hard disk. This can be determined using fdisk – l command, where the output will contain “Disklabel type:”  for the existing hard disk.

Cheers