Sunday, April 20, 2025

Run windows apps through Wine emulator on Mac OS Apple Silicon

 https://macappstore.org/whiskey/ 

About the App

Install the App

  1. Press Command+Space and type Terminal and press enter/return key.
  2. Copy and paste the following command in Terminal app:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 
    and press enter/return key. Wait for the command to finish. If you are prompted to enter a password, please type your Mac user's login password and press ENTER. Mind you, as you type your password, it won't be visible on your Terminal (for security reasons), but rest assured it will work.
  3. Now, copy/paste and run this command to make brew command available inside the Terminal: echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
  4. Copy and paste the following command:
    brew install --cask whiskey

Done! You can now use Whiskey.

Refer this video on the steps to use the app on Mac OS Apple Silicon laptops

https://www.youtube.com/watch?v=8KeES5llh9I&t=82s 


pivot_root vs chroot vs switch_root

The chroot command modifies the root directory for a process, limiting its access to the rest of the filesystem. This is useful for security, containerization, or testing purposes. The process running under chroot has no knowledge of anything outside its jail, making it appear as if it is running on the root filesystem.

123

In Linux, pivot_root, chroot, and switch_root are commands used to change the root filesystem of a process. Each has its specific use cases and functionalities.

pivot_root

The pivot_root command is used to change the root filesystem of the current process and its children. It swaps the current root filesystem with a new one, making the old root accessible at a specified location. This command is typically used during the boot process when the system transitions from an initial ramdisk (initrd) to the real root filesystem
1.

Example:

mount /dev/hda1 /new-root
cd /new-root
pivot_root . old-root
exec chroot . sh <dev/console >dev/console 2>&1
umount /old-root

In this example, the root filesystem is changed to /new-root, and the old root is accessible at /old-root3.

chroot

The chroot command changes the root directory for the current process and its children to a specified directory. Unlike pivot_root, chroot does not swap the root filesystem but simply changes the reference point for the current process. This command is often used to create isolated environments, such as chroot jails.

2.

Example:
chroot /new-root /bin/bash
In this example, the root directory for the current shell is changed to /new-root, and /bin/bash is executed within this new root2.

switch_root

The switch_root command is used to switch from an initial ramdisk (initramfs) to the real root filesystem. It is similar to pivot_root but is specifically designed for use with initramfs. switch_root performs additional cleanup tasks, such as moving common mount points (/dev, /proc, /sys, etc.) into the new root and attempting to delete everything in the old root
1.

Example:
switch_root /new-root /sbin/init

In this example, the root filesystem is switched to /new-root, and /sbin/init is executed as the new init process
1.

Key Differences

pivot_root: Swaps the current root filesystem with a new one, making the old root accessible. Used during the boot process with initrd.

chroot: Changes the root directory for the current process without swapping the root filesystem. Used for creating isolated environments.

switch_root: Switches from initramfs to the real root filesystem, performing additional cleanup tasks. Used during the boot process with initramfs.

Use Cases

pivot_root: Used when you need to preserve the original root for some purpose, such as during the boot process with initrd1.


chroot: Used to create isolated environments, such as chroot jails, for security or testing purposes2.


switch_root: Used to switch from initramfs to the real root filesystem during the boot process, performing additional cleanup tasks1.

By understanding the differences and use cases of these commands, you can choose the appropriate one for your specific needs in managing the root filesystem of a process.

Featured

TechBytes on Linux

This is a growing list of Linux commands which might come handy for the of Linux users. 1. Found out i had to set the date like this: ...

Popular Posts