You want to figure out whether your Windows is 32-bit or 64-bit.
Start the “DOS window” (
cmd.exe) and execute the following command:
C:\>wmic os get osarchitecture OSAsarchitecture 64-bit C:\>
I got a new laptop at my workplace, a Toshiba Satellite C55. I decided to put Windows 8.1 and Ubuntu 14.04 LTS on it.
I had a Windows 8.1 ISO but I didn’t want to burn it on a DVD. Instead, I put it on a USB stick. I found an excellent tool called Rufus that allows you to create a bootable USB stick from an ISO file. Here is a youtube video tutorial too.
When Windows 8.1 was installed, the next step was to install Ubuntu. Restarting Windows is tricky if you want to change the boot order: hold down the SHIFT key and select reboot while pressing the SHIFT. Upon reboot I had to press F12 to get to the boot order menu.
Installation of Ubuntu went flawlessly.
NTFS partitions cannot be mounted
Once I had a strange problem. Ubuntu started to complain that it cannot mount the Windows partitions. It turned out that Windows was hibernated and thus the NTFS paprtitions cannot be mounted in read/write mode. But why is it hibernated when I restarted Windows?
Well, another “cool feature” of Windows 8.1 is that you can power it off / restart it in two different ways! Option 1: right click on the Windows button in the bottom left corner and select halt / restart. This will do some hibernation, thus the next boot will be faster. Option 2: move the mouse to the bottom right corner, wait for the tiles to show up and halt / restart the machine there. It is a normal power off / reboot without any hidden hibernation.
So, if you use Linux with Windows 8.1 in dual boot, you’d better stop / restart Windows using Option 2 (on the right side).
I got a new desktop machine but it had Windows 8.1 preinstalled on it. What’s worse, it was a 32-bit version (on a 64-bit machine). I poked around a bit but I didn’t like it so I decided to put a good old Windows 7 on it with Ubuntu 14.04. It was afternoon…
It’s almost midnight and I got ready just a few minutes ago. Man, this UEFI thing made me suffer…
What I learned: if you install Windows 7 in UEFI mode, then install Ubuntu 14.04 in UEFI mode too! If you try to install Ubuntu in normal mode, you will have conflicts.
But what does it mean to start the installation in UEFI mode? It took me a while to figure out.
When you start the machine, you can press a button to enter the boot menu where you can select the device you want to boot from. In my case I got this info on my screen (green emphasis by me):
After pressing F11 (it may be a different button in your case), I got this screen:
I had my Windows 7 on DVD and Ubuntu 14.04 on USB. Now, if you select option 1 (see the green numbers), then Windows 7 is started normally, while option 2 starts Windows 7 in UEFI mode. Similarly, option 3 starts Ubuntu normally, while option 4 starts it in UEFI mode. Once the installation is started, it cannot be changed later.
I had another problem. After several retries, I couldn’t install Windows 7. I got an error message that the selected disk is of GPT partition style. I found the fix for this problem here: http://www.youtube.com/watch?v=DQf9YqbD8WI. But be careful! This “fix” removes every partition from your hard drive. Do it only if you want to start with a clean sheet.
The fix above in short: when the screen with the “Start install” button appears, press Shift+F10 to open a terminal. Here start the command “diskpart”. Inside diskpart, run these commands:
list disk select disk 0 clean
It will remove the GPT flag but it will also remove all the partitions!
Now, as I had a clean HDD, I installed Windows 7 first in UEFI mode (option 2 in the figure above).
After this I started the Ubuntu installation in UEFI mode too (option 4). This time I didn’t have any problem and I didn’t have to do any fancy settings with the disk partitioning. I created a swap partition and a root partition, then “start install”.
After a reboot I had a GRUB menu where I could start either Windows or Ubuntu.
Code::Blocks is an excellent choice. It has an installer that also contains a C compiler. Awesome. Just install it and you are ready to develop. It has all the nice features that you expect from an IDE.
Code::Blocks is actually cross platform, thus it exists under Linux too! It’s also good for C++. It’s open source.
My primary operating system is Linux but since I need to work with Powerpoint too, I installed Windows 7 in VirtualBox. Under Windows I prepare my presentations but I want them synchronized on all my machines. For the synchronization I was using Dropbox.
I had Dropbox on Linux (host machine) and on Windows (guest machine) too. When I edited a file under Windows, Dropbox synced it to the Linux host too (the Windows client uploads it to the cloud; the Linux client downloads it from the cloud). It worked fine, though it was not not optimal. If I didn’t use the Windows guest for a long time, then after a boot I had to wait some time till Dropbox synced everything and I could start working only after that.
However, something happened to the Windows Dropbox client recently. Maybe it’s a bug, I don’t know, but the Dropbox client in my Windows guest became terribly slow. It keeps syncing but it doesn’t upload the changes, or I need to wait an hour or so to upload a file 1 MB of size. This is ridiculous and unacceptable. Note that I dind’t experience similar issues with the Linux client.
How to have a synchronized folder between a Linux host and a Windows guest without a Dropbox client on the guest?
First I made sure that my Dropbox folders were synced between the host and the guest. After this I uninstalled Dropbox on Windows and removed the
C:\Dropbox folder entirely. Since it was synced with the Linux host, I had an exact copy of the
Dropbox folder on Linux. Then shut down the Windows guest.
Here (http://www.maketecheasier.com/share-files-in-virtualbox-between-vista-guest-ubuntu-host) you can find an excellent post on how to set up a shared folder between a Linux host and a Windows guest. On the Linux host I shared my Dropbox folder (
$HOME/Dropbox) that appears now as a new drive in the Windows guest (
G:\ in my case). Now, if I modify something under Windows, it will be visible immediately in the Linux file system that the Dropbox client on Linux will notice and sync.
With this I could solve two problems. First, when I boot up the Windows guest, I don’t need to wait for the Dropbox client to sync. Second, if I change something under Windows, it is still synced to the Dropbox cloud, though I have no Dropbox client on Windows anymore.
You have a Windows machine and you want to use Linux (e.g. Ubuntu) in it. That is, you want to install an Ubuntu VM (virtual machine) inside Windows. You want to use the command line only, thus you don’t need any graphical interface. Maybe you have a weak laptop where a graphical VM wouldn’t even run normally. In addition, you want to get it done quickly, you have no time to download an Ubuntu image and go through the installation process. What to do?
Use Vagrant. Vagrant is a tool for building complete development environments. We will use Vagrant with VirtualBox, so we need to install both.
Visit https://www.virtualbox.org/ and select Downloads on the left side. Download and install the latest version for Windows hosts. You can also install the Extension Pack. Make sure to install the version that matches with the previously installed VirtualBox version. We won’t work with VirtualBox directly, but Vagrant is built on top of it, so Vagrant will need it.
Visit http://www.vagrantup.com/downloads and install the Windows version. For the curious, Vagrant is written in Ruby. It is very likely that you will have to restart your computer after the installation. After the restart, you can use the command “
vagrant” in the shell, it is added to the
PATH by the installer.
Basic usage of Vagrant
As indicated in the official guide, using vagrant is very easy.
I suggest that you should create a dedicated directory for your first Ubuntu VM,
C:\vagrant for instance. Enter this directory, open a terminal (with the command “
cmd“) and execute the following commands:
c:\vagrant> vagrant init precise32 http://files.vagrantup.com/precise32.box c:\vagrant> vagrant up
The first command downloads a basic Ubuntu 12.04 LTS image. The second command starts the VM.
Now it’s time to log in to the running VM:
c:\vagrant> vagrant ssh # there is a chance that it won't work...
Well, if it doesn’t work for you under Windows, here is alternative solution: use Putty. Details: hostname: 127.0.0.1, port: 2222, username: vagrant, password: vagrant.
Some other useful commands:
c:\vagrant> vagrant status # Is the VM running? c:\vagrant> vagrant halt # stop the VM; counterpart of "vagrant up"
Use Bash as your shell
The default Windows shell “
cmd” is quite lame. If you want to use a better shell, install the Cygwin environment, which is a Unix compatibility layer for Windows. It’s enough to install the default packages, but don’t forget to add the “
openssh” package too. In my case, I installed the 64-bit version and added the “
c:\cygwin64\bin” directory to my
PATH. After this you can launch the command “
bash” and execute these commands:
$ cd /cygdrive/c/vagrant $ vagrant status # Is it running? $ vagrant up # if it was not running $ vagrant ssh # thanks to the openssh package, it works now ... # work with the VM $ vagrant halt # stop it if you don't need it anymore
Using Vagrant under Linux