Windows - Ubuntu: Questions and Answers (2014)

Ubuntu: Questions and Answers (2014)

Windows

Skip to questions, Wiki by user rolandixor

Microsoft Windows is a popular operating system developed by Microsoft. If your question relates more to Windows than it does to Ubuntu, please use the SuperUser forum - you can use the same StackExchange account.

This tag may include Windows 95, Windows 98, Windows Millennium, Windows XP, Windows Vista, Windows 7 or Windows 8 .

The latest stable version is windows-8.

Questions with this tag should relate to Ubuntu to be on-topic for this site.


Questions

Q: How can I install Windows software or games?

Tags: windows (Next Q), wine (Next Q)

Can .exe and .msi files (Windows software) be installed in Ubuntu?

Tags: windows (Next Q), wine (Next Q)

User: akshatj


Answer by tommy-brunn

Yes, if you first install the Wine compatibility layer (link)from the Software Center, you can install Windows applications in Ubuntu. Be warned though that not all applications work perfectly or without glitches. Some applications are even unusable, while others work perfectly (see the Wine Application Database for a good idea of how well various programs work).

Once Wine is installed, you can simply double click an .exe or .msi file to run it. If this doesn't work for some reason, right-click the file and select "Open With Wine Windows Program Loader". Of course, only run executables from sources you trust to avoid Windows malware.

Screenshot of right-click opening an executable

If you run into compatibility issues, you may wish to try the latest Wine Beta version from the ppa:ubuntu-wine/ppa software source (see What are PPAs and how do I use them?). You might also consider installing Winetricks (link), CrossOver (link)or CrossOver Games (link)to install and use software more easily.

To see the debug output of Windows software (in case something goes wrong) run it from a terminal using wine msiexec /i file.msi or simply wine file.exe.


Answer by rafał-cieślak

Short answer

.exe files are not binary-compatible with Ubuntu. There are, however, compatibility layers for Linux, such as Wine, that are capable of running .exe.


Detailed answer and solutions

The underlying problem:

Ubuntu is a completely different system than MS Windows. Not only it looks differently, but it also uses different mechanisms for its core functions.

The problem with .exe files is that they are specific to Windows. No other system is capable of running them, because their contents are designed to work on a Microsoft's system. Linux uses different standards, different concepts, and therefore Ubuntu applications need to be adapted to them to work correctly.

If you have just migrated from Windows and are doing your baby steps with Ubuntu, you may be indeed surprised that .exe files fail to run. There may be different symptoms, either an error message may appear, or there may be no effect at all when double-clicking an .exe. This all happens, because Ubuntu has no idea what should it do to run that file. Ubuntu is not knowledgeable about how MS Windows works "behind the curtain", and therefore it can't execute the code that's within them. In technical jargon, one says that Windows and Linux executables are not binary-compatible.

Looking for alternatives

The first thing you should do is to realise that most likely you do not want to run that .exe file. Most Windows applications you are used to have their Ubuntu alternatives in Ubuntu Software Center.

Therefore the very first step when you try to run an .exe file is to check whether there is a Ubuntu version of the same application (like Firefox - it has both a Windows and Ubuntu edition), or a close alternative, which is not the same app, but does 99% the same stuff. For example, if you want to compose a document, instead of MS Office you will want to use LibreOffice.

How can I find an alternative?

Here are some tips.

1. Search Ubuntu Software Center.

o Launch the Ubuntu Software Center, type in the search box what kind of application you are looking for. For example, typing in "photoshop" finds The GIMP, which is a great advanced image editing tool, and is a great substitute for Adobe Photoshop.

o Many Windows applications are also available for Ubuntu, and have their identical version in Ubuntu Software Center, which is the preferred way of installing software in Ubuntu.

2. Search Ask Ubuntu (this very site).

o There are many questions here that explain what applications can be used as substitutes. Also, do not forget to ask a question if you need software-recommendation.

3. This Ubuntu Help page contains great tips when seeking for alternatives.

4. http://ubuntuguide.org/wiki/Alternatives

5. http://alternativeto.net/

Okay, but not all applications have alternatives. There are a number of cases where you will want to run the .exe program anyway. Examples include:

· You are trying to run an application of which alternative makes no sense. In case of most video games you will want to run them and not an alternative.

· You may want to run the original application instead of an alternative, because the alternative is not good enough. For example, many people consider Photoshop to be a much better editor than The GIMP.

· This is a very Windows-specific program, that makes little sense on Linux.

Luckily, you can get .exe files to run on Ubuntu.

Running .exe files on Ubuntu with WINE

What is Wine? Well, technically it's a compatibility layer. What it means is that it provides an environment similar to Windows to any .exe application you try to run. Therefore, with WINE .exe files will run on Ubuntu.

WINE is not installed by default. You can get it either by:

· Searching for "wine" in Ubuntu Software Center.

· Running the command: sudo apt-get install wine.

Details on installing WINE can be found in this question.

Okay, so I installed WINE. Now what?

Proceed to launching your .exe file! Double-click it, and with a bit of luck everything will seem like on Windows. Voil!

WARNING: Not all applications will behave correctly when run with WINE. WINE is by no means perfect, and because it pretends to be a Windows environment instead of actually being a real one, some applications may malfunction. Common problems may include incorrectly displayed fields, fullscreen issues with video games, copy-protection problems. Some of them can be solved with litte hassle, make sure to check the WINE application database and use google to find hints in case your .exe does not work correctly.

Running Windows applications on Ubuntu with PlayOnLinux

There is another tool you may like which aids you in running Windows applications.

It's called PlayOnLinux (website) and it supports quite a wide range of software (browse).

What it does is it runs a specific version of Wine which is known to work best with the application you are willing to run. It also installs additional paths to provide maximum compatibility with Ubuntu. But you don't need to know about that; everything is done automatically.

Because of that, PlayOnLinux tends to provide the best results in case of running a widely known piece of software, including many video games.

Installing PlayOnLinux:

· Find it in Ubuntu Software Center, or

· Run sudo apt-get install playonlinux

Using PlayOnLinux:

Instead of double-clicking the .exe (which launches it with WINE), run PlayOnLinux application. Select "Install" button on the toolbar, and choose what application you wish to install. PlayOnLinux will guide you through the installation process (of course you will need installation media).

Once it's done, your installed application will be displayed in PlayOnLinux main window. Double click to launch it!

Q: Do I need to have 'antivirus software' installed?

Tags: windows (Next Q)

I thought that there was no need to scan for viruses either in Ubuntu or any Linux distros until I found virus scanner packages 'clamtk' and 'klamav' in Ubuntu software center yesterday.

This leads to the following questions:

· How do viruses differ between Linux and Windows?

· How do the strategies for protection differ between Linux and Windows?

· Should a virus scanner package be installed on my system? If so, which would be a better option?

Tags: windows (Next Q)

User: vinay-challuru


Answer by jim-mckeeth

There are viruses for most all platforms (the first worm was for DEC VAX) , they are just more common on Windows. Different platforms are more secure than others, but a virus can typically gain user level security, which is often good enough, on most platforms. You can actually run Windows without a virus scanner if you keep it patched and are really careful.

Differences from Windows to Linux for viruses: On Linux it is harder for the virus to get root (or system) level access. But it could probably still access your address book or saved passwords in Firefox (user level access).

Strategy: If you are really careful and know what you are doing you can get away without a scanner. A good strategy is to have your scanner just scan downloads or if you are bringing a file from another computer on a USB drive or floppy disk (assuming you have one). If you want you can have it do regular full system scans too. It is all about how paranoid you are, and how likely you are to get a virus.

For your laptop I would suggest only having the scanner scan downloads and when you are brining files from another computer. Having it do full system scans can be a battery drain.

A very important element of a virus scanner is having it updated with new signatures, so pick the package that has the best signature updates, and that works best for how you want to use it.


Answer by imaginaryrobots

Both klamav and clamtk are front-ends for the clamAV software. They do check for linux viruses, but they are most useful for making sure your linux computer isn't sharing infected files with windows machines. Most of the virus scanners for linux are actually for servers, and are meant to scan email or uploaded files as they are sent.

Wikipedia has a list of Linux malware, which should help inform about the risks: Linux malware - Wikipedia, the free encyclopedia. They list 30 viruses and various other possible threats.


Answer by crasic

You may not need a virus scanner per se, but you sure do need to keep your system up to date and secure (good passwords and system practices - permissions etc)

Personal Anecdote: I had a debian server running, It had an uptime of 400 days and I wanted to get to 500 before restarting it to update the kernel, I was being silly, and too cocky about it being a linux system . Since it was a server that served a research group, I gave all of my coworkers an ssh account. Turns out that some hacker exploited a bad password by one of my users and loaded on automated script that ran through 5 or 6 exploits before finding one that worked (an exploit that was patched, had I updated the kernel). It rooted the server and then proceeded to set up a bot (Campus IT caught the hack before I did, they noticed suspicious IRC traffic and contacted me).

Funny story, is that I used those same scripts to take back control of the machine to backup some raw data before nuking the system.

Long story short, keep your system up to date, keep your passwords secure, maintain good administrative practices. And unless you literally go and do sudo rm -rf /* because someone online told you to, it's unlikely you will ever have any trouble with your linux computer.


Tags: windows (Next Q)


Q: How can I repair grub? (How to get Ubuntu back after installing Windows?)

Tags: windows (Next Q), grub2 (Next Q), dual-boot (Next Q)

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.

How can I get Ubuntu back?

Tags: windows (Next Q), grub2 (Next Q), dual-boot (Next Q)

User: salahuddin


Answer by scott-severance

When you install Windows, Windows assumes it's the only OS on the machine -- or at least it doesn't account for Linux. So, it replaces GRUB with its own boot loader. What you have to do is replace the Windows boot loader with GRUB. I've seen various instructions for replacing GRUB by mucking around with GRUB commands or some such, but to me the easiest way is to simply chroot into your install and run update-grub. chroot is great because it allows you to work on your actual install, instead of trying to redirect things here and there. It's really clean.

Here's how:

1. Boot from the live CD.

2. Determine the partition number of your main partition. GParted can help you here. I'm going to assume in this answer that it's /dev/sda2, but make sure you use the correct partition number for your system!

3. Mount your partition:

4. sudo mount /dev/sda2 /mnt # make sure that sda2 is correct!

4. Bind mount some other necessary stuff:

5. for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done

5. chroot into your Ubuntu install:

6. sudo chroot /mnt

6. At this point, you're in your install, not the live CD, and running as root. Update grub:

7. update-grub

If you get errors, go to step 7. (Otherwise, it is optional.)

7. Depending on your situation, you might have to reinstall grub:

8. grub-install /dev/sda

9. update-grub # I'm not sure if this is necessary, but it doesn't hurt.

8. If everything worked without errors, then you're all set:

9. exit

10.sudo reboot

9. At this point, you should be able to boot normally.

If you cannot boot normally, and didn't do step 7 because there were no error messages, try again with step 7.

· Sometimes giving GRUB2 the correct configuration for your partitions is not enough, and you must actually install it (or reinstall it) to the Master Boot Record, which step 7 does. Experience helping users in chat has shown that step 7 is sometimes necessary even when no error messages are shown.


Answer by web-e

The windows installer doesn't care about other OS in the system. So it writes own code over the master boot record. Its not a problem of windows installer, its intended. If you reinstall, upgrade windows you will face the issue. Fortunately the solution is easy too.

You need to repair the mbr. Do the following

Boot using a live usb/cd of ubuntu. Use boot-repair to fix the problem.

After booting with live usb/cd ,Run following command in terminal,

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update

sudo apt-get install -y boot-repair && boot-repair

Use Recomended Repair.

enter image description here

More info - https://help.ubuntu.com/community/Boot-Repair


Answer by desgua

I never got in trouble by using these instructions:
https://wiki.ubuntu.com/Grub2#Recover

First of all, you must start your system from a live cd. Then

"METHOD 3 - CHROOT

This method of installation uses the chroot command to gain access to the broken system's files. Once the chroot command is issued, the LiveCD treats the broken system's / as its own. Commands run in a chroot environment will affect the broken systems filesystems and not those of the LiveCD.

1) Boot to the LiveCD Desktop (Ubuntu 9.10 or later). Please note that the Live CD must be the same as the system you are fixing - either 32-bit or 64-bit (if not then the chroot will fail).

2) Open a terminal (Applications > Accessories > Terminal).

3) Determine your normal system partition - (the switch is a lowercase "L")

sudo fdisk -l

If you aren't sure, run

df -Th

Look for the correct disk size and ext3 or ext4 format.

4) Mount your normal system partition:

Substitute the correct partition: sda1, sdb5, etc.

sudo mount /dev/sdXX /mnt

Example: sudo mount /dev/sda1 /mnt

5) Only if you have a separate boot partition: sdYY is the /boot partition designation (for example sdb3)

sudo mount /dev/sdYY /mnt/boot

6) Mount the critical virtual filesystems:

sudo mount --bind /dev /mnt/dev

sudo mount --bind /dev/pts /mnt/dev/pts

sudo mount --bind /proc /mnt/proc

sudo mount --bind /sys /mnt/sys

7) Chroot into your normal system device:

sudo chroot /mnt

8) If there is no /boot/grub/grub.cfg or it's not correct, create one using

update-grub

9) Reinstall GRUB 2:

Substitute the correct device - sda, sdb, etc. Do not specify a partition number.

grub-install /dev/sdX

10) Verify the install (use the correct device, for example sda. Do not specify a partition):

sudo grub-install --recheck /dev/sdX

11) Exit chroot: CTRL-D on keyboard

12) Unmount virtual filesystems:

sudo umount /mnt/dev/pts

sudo umount /mnt/dev

sudo umount /mnt/proc

sudo umount /mnt/sys

13) If you mounted a separate /boot partition:

sudo umount /mnt/boot

14) Unmount the LiveCD's /usr directory:

sudo umount /mnt/usr

15) Unmount last device:

sudo umount /mnt

16) Reboot.

sudo reboot

"


Tags: windows (Next Q), grub2 (Next Q), dual-boot (Next Q)


Q: Unable to mount Windows (NTFS) filesystem due to hibernation

Tags: windows (Next Q), nautilus (Next Q), mount (Next Q)

Whenever I boot Ubuntu, I get a message that it cannot mount my windows partition, and I can choose to either wait, skip or manually mount.

When I try to enter my Windows partition through Nautilus I get a message saying that this partition is hibernated and that I need to enter the file system and properly close it, something I have done with no problem so I don't know why this happens.

Here's my partition table, if any more data is needed please let me know.

Device Boot Start End Blocks Id System

/dev/sda1 2048 20000767 9999360 83 Linux

/dev/sda2 20002814 478001151 228999169 5 Extended

/dev/sda3 * 478001152 622532607 72265728 7 HPFS/NTFS/exFAT

/dev/sda4 622532608 625141759 1304576 82 Linux swap / Solaris

/dev/sda5 20002816 478001151 228999168 83 Linux

Tags: windows (Next Q), nautilus (Next Q), mount (Next Q)

User: yotamoo


Answer by adempewolff

A bug has been filed about the Nautilus dialog you are seeing as it recommends a potentially dangerous option that could result in data loss. Please do not run the command in this dialog unless you want to delete your saved Windows session and potentially lose unsaved work.

Explanation: Why Linux can't open hibernated Windows partitions:

You are seeing this error because you hibernated Windows instead of turning it off the normal way (in newer versions of Windows, hibernate might be the default option).

· Hibernating saves the current state information to the hard disk and then powers down the computer.

· Shutting down the computer closes all programs and ends all running processes before powering down the computer.

When you turn off Windows by hibernating it, you are essentially pausing the system and saving all of that information (into a big file called hiberfil.sys) This way when you resume from hibernation all of your applications and files will be exactly how you left them. It also sets a flag in hiberfil.sys to let other Operating Systems know that Windows is hibernated.

Making changes to your Windows (ntfs) partition while it is hibernated could be dangerous--it could cause Windows to not resume from hibernation or to crash after resuming. Because of this, the tool (ntfs-3g) that mounts (opens) the partition will not mount it in read-write mode if it sees a hibernation flag. As such, Nautilus, the default file browser, will not be able to automatically open this partition--hence the error message that you see--because it is trying to open it in read-write mode.

Solution: Windows 7 and older

There are three ways to mount a hibernated Windows partition:

1. Boot into Windows and power down the system by shutting it down completely. You may then boot back into Ubuntu and the partition will mount in read-write mode automatically when you open it in Nautilus. Note that the "Shut Down" option may not be the one displayed in your start menu by default. You may need to click the button next to it to see further options.

2. Manually mount the filesystem in read only mode.

o Check to see if you have a mount point (folder for mounting your partition in) for your Windows partition in the folder /media using this command:

ls /media

o If you don't see a folder for your Windows partition, you should create one with the following command:

sudo mkdir /media/windows

o Next, mount the partition in read-only mode onto this folder with this command:

mount -t ntfs-3g -o ro /dev/sda3 /media/windows

Note that you should change /media/windows if your mountpoint is called something else.

o Now you will be able to view/open files on your Windows partition using any program in Ubuntu. However you will not be able to write to the partition or modify any files as it is in read only mode.

3. If you need to mount the partition in read-write mode and are not able to or willing to boot into Windows and shut it down completely there is a third option. However, it is not included here because it completely deleteshiberfil.sys and will cause you to lose all unsaved information in the hibernated Windows programs. The following is a quotation from man ntfs-3g about the option that would be used to do this.

4. remove_hiberfile

5. Unlike in case of read-only mount, the read-write mount is

6. denied if the NTFS volume is hibernated. One needs either to

7. resume Windows and shutdown it properly, or use this option

8. which will remove the Windows hibernation file. Please note,

9. this means that the saved Windows session will be completely

10. lost. Use this option under your own responsibility.

Solution: Windows 8

There is a new feature in Windows 8 called Fast Startup. If this feature is enabled (which it is by default), Windows 8 does not actually completely shutdown when you choose shutdown. Instead, it does a "hybrid shutdown". This is something like hibernating; it makes booting Windows 8 back up faster. So, you need to disable this feature to be able to shut it down properly, and be able to mount the Windows partitions. To do this, boot into your Windows 8 and:

Note: disabling Fast Startup will most likely make your Windows 8 take a longer time to boot. There are no "exact" numbers, but let's say that if it took you 10 seconds to boot into Windows 8, it will now take you 50 seconds after disabling this feature.

1. Open Control Panel in the small icons view and click on Power Options.
2. Click on Choose what the power buttons do.
3. Click on Change settings that are currently unavailable.
4. Uncheck Turn on fast startup (recommended).
Click on the numbers above to see screenshots.

Click on Save changes. Now, shutdown Windows 8 and boot back into Ubuntu. You'll be able to mount without getting errors.

Source: Fast Startup - Turn On or Off in Windows 8.


Tags: windows (Next Q), nautilus (Next Q), mount (Next Q)


Q: How can I create a Windows bootable USB stick with Ubuntu?

Tags: windows

I'd like to create a Windows 8 bootable USB stick, but I don't have a Windows machine with me to do so.

So how do I do it with Ubuntu/Linux?

Tags: windows

User: zignd


Answer by avinash-raj

Create a bootable Windows USB from Ubuntu through WinUSB software.

Ubuntu 13.10,13.04,12.10,12.04

Run the below commands on terminal to install WinUSB from a PPA,

sudo add-apt-repository ppa:colingille/freshlight

sudo apt-get update

sudo apt-get install winusb

WinUSB screenshot

Ubuntu 14.04

This method will install Winusb package from the previous version's repository(saucy).

sudo add-apt-repository ppa:colingille/freshlight

sudo sh -c "sed -i 's/trusty/saucy/g' /etc/apt/sources.list.d/colingille-freshlight-trusty.list"

sudo apt-get update

sudo apt-get install winusb

enter image description here


Tags: windows


Q: How can I install Windows software or games?


Q: How can I install Ubuntu without removing Windows?


Q: How can I install Windows after I've installed Ubuntu?


Q: Do I need to have 'antivirus software' installed?


Q: How can I repair grub? (How to get Ubuntu back after installing Windows?)


Q: Unable to mount Windows (NTFS) filesystem due to hibernation


Q: What is the equivalent of Windows System Properties or Device Manager?


Q: How can I create a Windows bootable USB stick with Ubuntu?