LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux Equivalent of Windows EXE (https://www.linuxquestions.org/questions/linux-newbie-8/linux-equivalent-of-windows-exe-579240/)

rn5a 08-23-2007 11:04 AM

Linux Equivalent of Windows EXE
 
I am a Linux newbie & have Mandriva installed in my m/c. What I would like to know is how does one install a software in Mandriva. Like in Windows, to install a software, conventionally one has to open a file that has the EXE extension. Likewise, in Mandriva, which file extension denotes that a file is an executable file? In other words, what file extension is the counterpart of the Windows EXE in Mandriva?

Also does one have to install a software to open executable files in Mandriva or is there an in-built program in Mandriva which automatically opens executable files when double-clicked in Mandriva?

Thanks,

Ron

Cichlid 08-23-2007 11:28 AM

This is a good question. As it was also one of my questions when I first started to use linux. I found the best way to install programs was to use the build-in package manager that the distrobution comes with. If you want to install some other program that is not ready made for you distro, then carefully read the FAQ for the program you want to install. I found the instructions very good and detailed. They'd tell you how to unpack using tar, then which script to execute.

I'm sure you will recieve much better detailed answers than mine. I'm not much into using the terminal or installing programs.

Nylex 08-23-2007 11:30 AM

Executables in UNIX usually don't have extensions.

pixellany 08-23-2007 11:35 AM

Linux does not use file extensions the way windows does. Assuming that the file actually contains executable code, all that is required is to have the execute permission set. (File extensions ARE used to automatically call certain programs--just like Windows)

There is no added SW required to run any executable--except maybe one or more libraries. In Linux, these are called "dependencies".

The best way to install SW is with your package manager. Here's a link describing package management on Mandriva: http://en.wikipedia.org/wiki/Mandriv...ackage_manager

indienick 08-23-2007 11:36 AM

Welcome to the wonderful world of Linux (and it's package management)!
There's two ways you can go about installing software (or packages as is more common to call them): text-based, or graphically.

Although the text-based way isn't necessarily the most friendly-looking way, you may find yourself preferring it. What you have to do is open up a terminal emulator (like Konsole, Gnome-Terminal, xterm, etc.) and make yourself root by typing
Code:

$ su
Don't type the dollar sign, that just represents the user prompt. Once you type "su" you will be prompted for a password, and in there, put in the password that you set up during the installation/setup process (for root, not your user). There are two commands you can use to install packages from the command line: rpm and urpmi.
Use the RPM command for when you have downloaded an RPM package, and use URPMI (which you will more than likely need to update) for installing packages from a repository (noun. a remote place where a whole lot of packages are available).
Code:

To install...
# rpm -Uvh package-name-version.architecture.rpm
# urpmi package-name

To remove...

# rpm -e package-name
# urpme package-name

Graphically installing packages is made REALLY easy with Mandriva. I can't remember exactly where to find the MCC (Mandriva Control Centre) but if you search through the menus under "System" submenus, you should find it no problem. :) It's really straight-forward from there.

Jason21 08-23-2007 12:45 PM

There are two ways I know of to install software in linux. One is to "unzip" (untar in linux terminology :P ) the file onto a new folder, enter the folder by the terminal like mentioned before and type the follwing commands:

Code:

./configure
make
make install

However, this method has the drawback that unless you keep a log of where your files go you won't be able to uninstall them by erasing them using the rm command. The best way is to use your distribution's integrated package manager.

marozsas 08-23-2007 01:21 PM

A file is executable if it has the execution file attribute set !
To see what are the files attributes do a "ls -l". Files with a "x" mark is executable.
Code:

[miguel@babylon5 lib]$ ls -l /etc/profile.d/
total 184
-rw-r--r-- 1 root root  88 2007-03-15 11:08 ccache.csh
-rw-r--r-- 1 root root  87 2007-03-15 11:08 ccache.sh
-rw-r--r-- 1 root root  764 2007-02-26 10:04 colorls.csh
-rw-r--r-- 1 root root  713 2007-02-26 10:04 colorls.sh
-rw-r--r-- 1 root root  80 2007-07-11 10:00 cvs.csh
-rw-r--r-- 1 root root  78 2007-07-11 10:00 cvs.sh
-rw-r--r-- 1 root root  192 2004-09-09 02:17 glib2.csh
-rw-r--r-- 1 root root  192 2005-12-12 03:58 glib2.sh
-rw-r--r-- 1 root root  58 2007-03-20 06:17 gnome-ssh-askpass.csh
-rw-r--r-- 1 root root  70 2007-03-20 06:17 gnome-ssh-askpass.sh
-rwxr-xr-x 1 root root  545 2007-05-15 15:58 kde.csh
-rwxr-xr-x 1 root root  507 2007-05-15 16:06 kde.sh
-rw-r--r-- 1 root root  218 2004-09-09 04:12 krb5-devel.csh
...

In the above listing kde.csh and kde.sh are executables (programs), the others are plain files.

To turn on/off the executable bit for a file:
Code:

chmod a+x /path/to/your/file
(or)
chmod a-x /path/to/your/file

The are three groups in the file attributes: for the owner, for the group, and for others. This is why there are 3 "x" in the above listing. The file can be executed by the owner, by people in the same group the file are, and by others. You can set the file attributes for each group using the modifiers u (user/owner), g(group), o(others) and a(all).

If you set the execution bit on for a regular file, the shell will try to execute and interpret the file contents. This does not means you get any real results, probably only message errors for the not-understand instructions in the file.


All times are GMT -5. The time now is 10:47 PM.