7

I have been trying to install programs onto my newly loaded Ubuntu system and so far I have found that they belong in the etc folder, but of course I do not have permissions for this as Linux has set up their systems to be like this. How can I bypass this within the terminal?

I'd like to install old programs I saved from my previous system (Windoes 10) like VLC, etc onto my Linux system. Is there a better (and safer) place to install them than the etc folder or should I just redownload them completely?

12
  • 8
    to write to /etc you can use sudo, but that is not the place to install programs. Please tell us what you are actually trying to achieve so we can help you properly without breaking your system
    – Zanna
    Dec 13, 2016 at 8:42
  • 6
    Programs haven't belonged in the /etc folder since about 1980. If you want to install software for all user, either use the Ubuntu package manager or install the software into /usr/local or /opt, that's what they're for. Dec 13, 2016 at 9:27
  • 6
    @Enzo You should download native Linux version of the applications whenever possible.
    – Melebius
    Dec 13, 2016 at 11:57
  • 9
    @Enzo old programs you saved from your Windows 10 system will not run under Linux. You need to install native Ubuntu packages, for example sudo apt install vlc. Dec 13, 2016 at 14:27
  • 3
    @LưuVĩnhPhúc: Download an entire DVD instead of just downloading the packages one wants to install? That's not a way to save on download costs. Dec 13, 2016 at 20:03

2 Answers 2

27

Windows programs will not run natively on Ubuntu. You would probably be able to run them in Wine (a Windows compatibility layer for Unix-systems), but in most cases, there is also a Linux version. If you're looking for alternative programs simply browsing the software center (search for "Ubuntu Software" in the dash) will get you results, if not, search the web or check out alternativeto.net. They have a filter option for Linux programs.

Be careful fooling around with folders outside your home directory. Usually you're supposed to install apps using the apt-get install application-name or snap install application-name command, from the software center, or by downloading and installing .deb files.

But if you need to do something funky in etc, just prefix your commands with sudo or type the sudo bang bang (sudo !!) command directly after you issued a command with insufficient permissions. If don't want to retype the sudo command every time, you can issue sudo -i to login as root or sudo su to log in as root and stay in your home folder. Doing this will give you administrative rights within that terminal session. After you're finished, type exit to log back in with your user account or close the terminal window. But be careful: With great power comes great responsibility. And don't drink and sudo.

Also, most programs don't go in the etc folder. Use usr or opt. If you're using wine to run your old windows apps, you will use what is called a virtual C drive - essentially just a folder inside you home directory. Detailed instructions can be found on their website.

6

Along with the information currently posted here I'd also like to add several things in terms of cross-platform compatibility between Linux and Windows:

  • Modern Windows is built off the Windows NT platform (which in turn can run DOS applications, but is entirely different from DOS); Ubuntu/Linux is built off of Unix. You simply can't run most Windows applications natively under Ubuntu, and vice versa.
  • Both use entirely different rendering APIs - Microsoft uses DirectX (can use OpenGL) while Linux relies on OpenGL (note, this is likely to change with the introduction of Vulkan, which is the cross-platform equivalent of DirectX 12).
  • Wine, or Wine is not an Emulator, is a compatibility layer that allows some Windows programs to be run in Ubuntu. WineHQ has a list of applications with user-submitted reviews for various Windows applications under Wine.
  • Wine is limited to DirectX 9 or lower, which means that some applications and games are not supported. Wine also can't make low-level API calls which means that some programs that interface with the hardware will not work. (Ex: AutoHotkey).
  • Wine is roughly 10-20% slower than native Windows in most applications, as well. Always look for native Linux alternatives. Performance is better and you don't have to deal with the pain of switching and transferring between Windows and Ubuntu file structures.

However, files, documents, and videos from Windows that were used by other programs can be used in Ubuntu, and by Ubuntu applications.

Please, don't go around messing with system folders and permissions, especially as you are new to Ubuntu. Commands such as sudo, chmod, chown, rm, etc., can do irrevocable damage to your Ubuntu installation. Tread carefully, and you shall reap the benefits of switching to Ubuntu :)

5
  • 5
    The last version of Windows that was built on DOS was Windows ME; modern versions of Windows are built on Windows NT. Dec 13, 2016 at 19:15
  • Libreoffice in Wine is quite a bit faster than native Linux version — at least when rendering complex charts in Calc (shame on LibO, but this trait was inherited from OOo).
    – Ruslan
    Dec 13, 2016 at 19:34
  • @IgnacioVazquez-Abrams Forgot about that, edited. facepalm
    – negusp
    Dec 13, 2016 at 20:35
  • @Ruslan Edited.
    – negusp
    Dec 13, 2016 at 20:36
  • 1
    "You simply can't run Windows applications natively under Ubuntu..." See also: Binfmt_misc and How is Mono Magical?
    – cat
    Dec 14, 2016 at 0:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .