Skip to main content

Posts

Showing posts with the label MacOS

Installing JDK on MacOS

Check the version of JDK installed and the path on your MacOS /usr/libexec/java_home -V Check this instance/version of the JDK is currently running on your MacOS java --version The above command will show the currently used JDK and JRE If you have multiple instances of JDK installed on your MacOS and want to switch the version based on the required environment. You can do so by following the below steps: Edit ~/.bash_profile and set JAVA_HOME environment variable export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) In case of MacOS BigSur export JAVA_HOME=$(/usr/libexec/java_home -v 1.8.0)  The above command will switch the JDK version to 1.8 Reload the changes to the environment source ~/.bash_profile

Get the serial number of a computer using command

Windows Open a command prompt (by choosing the Command Prompt item from the Start menu, or typing cmd in the Start menu's " Run " box), and type the following: wmic bios get serialnumber MacOS Go to Utilities. Open the Terminal application and type: ioreg -l | grep IOPlatformSerialNumber Linux Open a shell and type: sudo dmidecode -t system | grep Serial Note: The user will need to have root access to the system.