# Workshop 2. Have accessible Linux environment
Linux is an Operating System (OS) just like your Windows 7/8/10/11 and MacOS X. In fact, your MacOS X is one of the UNIX family. If we need to talk about operating system, we will spend hours and hours debating why which one is better than the other one (just like iPhone vs Andriod). One thing I am sure of is the maturity of linux in developer community is high. Therefore, we will use Linux environment in this class.
Our Linux of choice is Ubuntu (opens new window) because of it popularity and user friendly (in some level).
Now, we must dicsuss your options on how can you have an access to Ubuntu.
# Option 1: Install directly on your machine
Well, as mentioned above, Ubuntu is an OS just like your Windows and MacOS X. Thereforem you can install it and use it just like any OS. The installtion guide can be found here (opens new window).
The Good
Chossing this way will allowed your Ubuntu to have an access to all resources (CPU,RAM,GPU). Your Ubuntu experience will be fast and smooth (if thing goes well).
The Bad
- Installing any OS might cause you to lose all of your data. You may need an experienced person to help you on this.
- Many application you need might not be there for you (Adobe suite, Microsoft Office suite). However, there are alternatives and mostly free.
# Option 2: Virtualization
Virtual (adjective): created by computer technology and appearing to exist but not existing in the physical world
Virtual Machine (VM) is a technology where we emulate a machine. In a very non technical words, you run Windows in your Windows (WindowsCeption!!!!!). A truly technical information of this technology can be found in internet which you should read. For now, we focus on your Ubuntu.
To have this technology, you will need a software that handling this emulating. In Windows, you can use Oracle VirtualBox (opens new window) or VMware Workstation Player (opens new window). There are other alternatives. In this workshop, we focus on a VMware Workstation Player because I like it.
The Good
- Now that your entire machine is a bunch of files, you can backup and migrate extremely easy.
- It is just a software, installing and playing around with your OS can be done safely.
- You are now fully taking adventage of your powerful machine. For thoes who does not have a powerful machine, now you have an excute to buy one.
The Bad
- It taking your resources. A LOT.
- It is slow and not smooth comparing to other alternatives.
# For VMware, mounting ShareFolder in Unbuntu
- Finish configuring the share folder option in the VM setting
- Launch VM.
- Create a
hgfsfolder in/mnt/sudo mkdir /mnt/hgfs
- Run the mount command
sudo vmhgfs-fuse .host:/ /mnt/hgfs/ -o allow_other -o uid=1000
- Go to
/mnt/hgfs/to check whehter your Shared Folder is there.cd /mnt/hgfsls
- Notice that once you reboot your VM, the Shared Folder is gone. To create a persistance mounting, do the following.
sudo vim /etc/fstab- add
vmhgfs-fuse /mnt/hgfs fuse defaults,allow_other 0 0to the last line, save and exist the file. sudo mount -a
- redo step 5 to check the result.
- enjoy~~! ( ^_^)b
- Tips: If you want to have this sharefolder on your desktop. Create a symbolic link with
ln -sln -s /mnt/hgfs/<SharedFolder_name>/ ~/Desktop/<symbolic_link_name>
ref: https://askubuntu.com/questions/1239726/windows-host-shared-folder-in-ubuntu-20-04
# Option 3. For Windows user only: WSL
Recently, Microsoft introduced Windows Subsystem for Linux (WSL) link (opens new window). This allows you to have Linux Terminal on your Windows 10/11 environment. The only downside of this option is there is no GUI. But who needs Ubuntu GUI?
The insturction to install WSL is here (opens new window)
The Good
- Fully access to your resources, fast, and smooth.
- No dual-boot. Run your Windows apps while you coding on Ubuntu.
The Bad
- Not mature but quickly growning.
- Some processes might run in the background forever.