LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-15-2012, 04:07 AM   #1
anon247
Member
 
Registered: Sep 2012
Distribution: Neon (atm)
Posts: 44

Rep: Reputation: Disabled
How do programs installers work in Linux?


Hi, i am very new to Linux.

I have a question about how programs work in Linux.

In Windows, there's quite a few applications made 'portable' meaning the files are copied to the HDD, but no installer is run and no changes are made to the OS registry or elsewhere. I tend to use this for programs that i infrequently use. I find that the more software i install (rather than using the portable variety) the slower my PC loads and runs.

1. Does Linux have 'portable apps'?
2. Does Linux need 'portable apps'?
3. What differentiates the way Linux installs and runs programs compared to Windows?

Thanks very much, sorry if it's a silly question. I am very new.

I did a search but couldn't see anything relevant.
 
Old 09-15-2012, 05:40 AM   #2
xamaco
Member
 
Registered: Sep 2009
Location: Bastelicaccia, Corsica
Distribution: Crux
Posts: 48

Rep: Reputation: 7
In GNU/Linux the way programs are installed depends on the distribution you use... Some, like Debian/Ubuntu/Fedora/Suse/..., feature a catalog where you might just have to do a few clicks to install an application (or typing a few things in a terminal, if you prefer ). At the other end of the possibilities, some distributions will require you to download source code, check for dependencies by yourself and to compile...

This being said, there is no registry in Linux. Almost all applications store their configurations in text files. Installing applications will not slow down your PC, unless you install daemons (services in Windows) because they are going to run permanently and obviously will take some memory and resources. Basically when you install a program, you will install an executable. Besides that, depending on the complexity of the application, you might also get shared library(ies) (DLL in Windows) and configuration file(s).

There is no definitive answer to your questions, but I would say that most applications in Linux can be considered as 'portable'.
 
2 members found this post helpful.
Old 09-15-2012, 06:05 AM   #3
zwitterion-241920
Member
 
Registered: Nov 2011
Location: AccountKiller
Distribution: AccountKiller
Posts: 89

Rep: Reputation: 39
There is no difference in the way programs are run (except that Linux uses the ELF and aout formats while Windows uses the exe format).
There is a huge difference in the way they are installed. In Windows, you would go to the program's website, download a .exe installer and then run it, hoping it doesn't contain any viruses.
In Linux you have an app store (it's called a package database or package repository, but it's just an app store). You tell your package manager to install a program and it looks it up in its internal database. It finds the package name and its dependecies. A dependency is when a package needs another package to work, a game, for example might use OpenGL and SDL for its video rendering and thus needs them to be installed.
It downloads the package and its dependencies and then it checks for file conflicts; if package foo has a file called /etc/foo.conf and package bar also wants to create a file /etc/foo.conf, the package manager will give an error message and quit installation. Then it checks if your hard disk (or SSD or USB) has enough free space, and installs the package. It then updates its database of file onwnership (package foo owns the file /etc/foo.conf).
Some Linux software will be distributed windows-style with an installer program, but its much safer to use the packagers from you package manager, since those have already been tested.
Packages do not have to be programs, some packages will contain fonts, game levels, software manuals or desktop backgrounds.

I have no idea what the Windows registry is, so I can't help you there.

Last edited by zwitterion-241920; 09-15-2012 at 03:57 PM. Reason: typo
 
4 members found this post helpful.
Old 09-15-2012, 06:12 AM   #4
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
In Arch for example you have tar archives which contain files of a program. When you install a program from this tar archive (which is normally downloaded from repositories) the package manager unpacks archive and places its files to specified dirs. That's it, the program is installed. Most of the times no changes are made to the system (unless it's some kind of wrong program like Gnome 3). Then you can type the name of the program in CLI to start it. What happens is when you type this name it's being searched in few directories specified in $PATH variable. When the binary starts it knows where to find other files that belong to this program due to definite logic of filesystem.

There are also "portable" programs for GNU which don't require installation. I don't know much about them, they are just like in Windows - packages of all files of a program. And that package gets extracted and then run. I personally never used those.
 
1 members found this post helpful.
Old 09-15-2012, 07:30 AM   #5
ronss
Member
 
Registered: Mar 2002
Location: phoenix,az
Distribution: red hat linux enterprise-centos
Posts: 766

Rep: Reputation: 31
i use fedora and mint.....

with fedora, an rpm distrobution, you can use the yum command from the terminal, logged in as user..such as - yum install(application)

with mint, a debian version- the command to install- apt get (and the application).
 
Old 09-15-2012, 10:04 AM   #6
SecretCode
Member
 
Registered: Apr 2011
Location: UK
Distribution: Kubuntu 11.10
Posts: 562

Rep: Reputation: 102Reputation: 102
Good answers so far. I'd add this on what it means to be portable:

Most apps - windows and linux - will set up menu items (GUI apps that is) which is a change to your config files.
Most apps - windows and linux - will store preferences (settings etc) in a predefined folder. In Linux this is usually a dot (hidden) file or directory in your home directory - like /home/you/.theapp. In Windows it's usually C:\Users\you\Local Settings\Application Data\theapp\ or something like that.
In addition, most large or complex apps have dependencies that you have to install beforehand (on windows) or which are pulled in automatically by the package manager (on linux), if they aren't already installed. (If they are, then they are shared by any other app that needs them.)

Portable apps can't do any of these things. You would need to call them by clicking an executable in the portable location (or the command line equivalent). They have to store preferences, if any, in the directory they run from (so they are available when run on other computers). If they have any dependencies they have to be included in the build or shipped on the same memory stick (say) which could increase the size, even if already installed on the user's hard drive. And these differences are not really harder or easier on Linux vs Windows.
 
Old 09-15-2012, 11:55 AM   #7
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
at the most fundamental level, both windows and Linux installers are essentially the same, just processes that unpack the software from an archive and copy it to a pre-defined location on the hard drive. That location is somewhere in the PATH (the list of places the OS will search for executables when issued a command to run a program). That however is where the similarities end.

In windows, the installer is a self contained executable that unpacks and copies binary files into the PATH and make any necessary changes to the registry to create a place to store it's settings.

Linux on the other hand has a variety of ways of doing this. The most common with big distributions is to create a repository of packages, which are essentially glorified zip files (or tarballs if you prefer) with a 'packing slip' that tells the package manager what version it is, what dependencies are needed, what architecture it is etc...

Another method of distribution with linux, which used to be more common, but is now more of a niche way of doing things with the big distribution, or how some of the more technical distributions do things, is to distribute a tarball of the binary with a list of dependencies which need to be manually resolved.

Even more extreme, but the most flexible way of distributing software is to provide the source code, which needs compiling before it can be installed and run, and won't compile properly if dependencies aren't met.

and then there are the handful of proprietary software packages (such as the proprietary drivers for NVIDIA and ATI video cards) DO provide a self extracting .run file that sometimes (as in the case of the video card drivers) contains a chunk of source code that is built on the fly by the installer, or just contains binaries. these .run files DO work the same as windows .exe files, but are currently relatively few and far between.

as for another large difference between linux and windows installation? Windows .exe installers usually come with any dependencies already built into the package (which can and sometimes DOES cause problems when a software overwrites a newer version of a library with it's bundled older version, breaking any software that relies on the new version), whereas as already mentioned, with linux, dependency resolution isn't handled by 'bundling' the dependencies, it is handled at the package management level (or manually) to prevent such problems.

as for portable apps for linux, a 'portible' app as mentioned is simply a version of an app bundled with whatever software is necessary to support it (libraries etc..), and is modified to store the configuration in the same folder as the portible app, thus creating a self-contained distribution of the app, and YES, there are portable apps for linux.
 
Old 09-17-2012, 05:40 AM   #8
anon247
Member
 
Registered: Sep 2012
Distribution: Neon (atm)
Posts: 44

Original Poster
Rep: Reputation: Disabled
Thanks all.

I'm building a donated box to have Linux to experiment, i'm sure i'll have many more very basic questions soon.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to work with java programs in linux ? mhawk Linux - Newbie 3 01-24-2011 07:10 AM
If I get Linux will my Vista programs still work? CL54849 General 3 06-07-2008 01:04 PM
What programs work on linux crazy_SNES Linux - Newbie 16 09-19-2005 08:39 AM
Programs/Installers won't execute. PLEASE HELP DesyphER Linux - Software 4 03-02-2005 04:01 PM
Linux Programs work on FreeBSD, right? Travis86 *BSD 7 08-06-2003 11:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration