LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing and searching for executables (https://www.linuxquestions.org/questions/linux-newbie-8/installing-and-searching-for-executables-45694/)

cuboctahedron 02-16-2003 04:00 PM

Installing and searching for executables
 
Hi,
This is the newbie form..:), so I hope nobody will find my question rediculous or so.(I also did several searches before this post)

Anyhow, I bought Linux RH8, since I want to run my own webserver; installed the whole cdrom succesfully etc, and started playing with Linux for the first time.

Questions I really would like to know
1) Is there a file manager like windows-explorer available for windows?
2) packages come in tar, rpm I noticed. I can't figure out how to determine what executables are if I install something, or where to install them to.(In windows this is pretty abvious)
3)..continuing from question2..I want to upgrade my RH8 with the latest PHPversion(4.3), mysql and apache. Now I am really scared that if I download software, upgrades or patches, and try to install them, my system will get scramed. Does linux has anything like a register, to make sure installations will override or recognize the older ones?
4) I read a lot about starting executables in the linux command line. How does linux know the relevancy of the commands, e.g:
-In windows you can set up in Dos path=c:\windows\command, so it will check the direcory to search for exetuables for example
5) is there a certain directory where files get installed by default? currently it looks somewhat messy with -var- bin- usr- root- etc I cant picture their purpose.


In windows, I felt like sort of in control, since I know where files are located and what executables are.

An answer to the above questions would really help me out of the darkness;

Kind regards
Patrick

acid_kewpie 02-16-2003 04:07 PM

1) there are millions. nautilus and konqueror being gnomes and kde's respectively. there's also gmc, rox, mc and many many others

2) packages already know where they want to install to. the layout of a filesystem in linux is substantially different to windows, normal apps do not have their own directoires etc.. with 99% of executables benig in /bin, /usr/bin /usr/local/bin or a couple of others. you CAN specify where exactly, but it doesn't matter normally.

3) register? good god no, that's why linux works properly. if you upgrade software by rpm packages or by source installs then you'll have no reason to worry at all. it's often advisable to ermove old packages before installing new ones if you can't actually "upgrade" them, but that's petty really.

4) unix is much more based in terminals and such, and so uses path statements much more effectively. the more you get used to console usage the more and mroe hacked and crap dos gets, you can see the linux / unix equivalents and in time you'll see how the unix conventions which long preceded MS DOS make much more sense, and MS stole a very crude, limited and nonsensical version of it

acid_kewpie 02-16-2003 04:10 PM

and 5 then......

well like i said, most things go in /bin /usr/bin etc... and everything liek this has their own purpose. these purposes are not always that obivous on a limited desktop system, but they will scale up flawlessly to hue networked systems. e.g. /bin = essestial system tools, /usr/bin = standard programs held centrally on servers, while /usr/local/bin = programs installed on the individual machine. these distinctions clarify so so much.

cuboctahedron 02-16-2003 04:26 PM

Thank for the fast reply Chris!

Indeed I have to get familiar with Linux, esp. coming from a Windows enviroment and trying to unlock myself from it.

Based on the above, I have just more 3 (small) questions.
1) Is there a sort of guide matrix on some website, where DOS commands are presented with their Linux equivalents (e.g. 'dir' would be 'ls'.)
2) Many packages go for certain Linux versions (Suse, RH etc) Will it harm the system if I would accidently installed a wrong version? And can I delete them by dropping a directory, or do I need to uninstall them (if possible)? Since deleting a directory isnt possible since, as you say, programs are not installed in just one single directory.
3) How can I determine, or find my executables (which extensions are commen etc.)

Thanx :)
Patrick

P.S. Are Linux company/developers planning on creating a uniform platfrom, where all applications can run (given the example between Suse and Redhat)?

acid_kewpie 02-16-2003 04:30 PM

1) there are hundreds. check the links section on this site, and many users have them on their sig, a good sig to find is "Nu-Bee"s

2) it could do, and there shouldn't be any reason to need to do so. if you can't find a redhat rpm then i'd say jsut install from source. of course you can always try a different rpm, it'll be easy enough to remove it.

3) sure, but the point is it doesn't matter save for a few large programs like mozilla which are so big they do benefit from a different installation method. try whereis, which, locate, find and a few others.

acid_kewpie 02-16-2003 04:32 PM

p.s well there's unitedlinux.com which people are very undecided about, and doesn't look to hot imho, depsite being generally derived from suse. but all applciations can un on any distro, there's no app that can only run on a certain distro. how they distribute the app is a different issue. installing from source is always an option that should be considered

fancypiper 02-16-2003 04:34 PM

An outstanding guide to Linux is the Rute User's Tutorial and Exposition.

# Basic Bash commands
Alphabetical Directory of Linux Commands

cuboctahedron 02-16-2003 04:49 PM

Quote:

Originally posted by acid_kewpie
different installation method. try whereis, which, locate, find and a few others.
So Linux than must know how what executable are. Under Windows I would do something like dir *myapp*.* /s (supposingly being the same as the above syntaxes provided) it would come up with e.g. myapp.dll, myapp.exe, myapp.ini etc,
So if I am correct Linux scips al other extensions, exept for the ones that run programs?

Thanks for you insight so far, guys. By the way the last link didnt work

fancypiper 02-16-2003 05:19 PM

Linux knows something is executable by the permissions settings. To make something executable, for example a script you want to run called mytasks.sh, you could chmod 755 /path/to/mytasks.sh and then you could run it by commanding /path/to/mytasks.sh.

acid_kewpie 02-16-2003 05:33 PM

extensions... now that's a superb example of the guts of dos not making sense. ok.. so a file is declared to be a program simply because the last three letters of it's name is "exe" ?! you get used to it in windows, but that's insanely crude when you actaully think about it. unix will typically use slightly more intelligent methods to decide if something is a program or not... i.e. actually looking at the program itself. sure you still get .mp3 etc.. but they're typically just for information more than anything else

cuboctahedron 02-16-2003 05:46 PM

confiusing,
I can understand by having certain file priveleges you can determine executables, but having an mp3 extensions is the only way to determine if a certain file can be assiociated with a mp3 player?
In windows, If I doubleclick a mp3 file, a player will popup an play the song; doesnt Linux work this way ? If so, there must be an extension-database somewhere ?

Another question about file management; Is it true that linux doesnt make destinction between harddrive (say C:\ and D:)? (sorry for showing microsoft stuff, but it's my only reference so far).
I ask this, since I want (when all is installed and working) make a ghost image of my drive(which to my knowledge is usually a drive letter). Can this be accomplised in Linux?

fancypiper 02-16-2003 05:54 PM

The Rute User's Tutorial and Exposition has good explanations of disks and how Linux uses them.

The Windows way of letters don't always refer to drives, they refer to partitions instead and unless you understand Microsoft's logic (!), you have no idea of which drive the letter refers to (unless each drive is only one partition).

Most of your confusion could be cleared up by that book.

See Copying Directory Trees with (tar | tar) for copying filesystems.

Bert 02-16-2003 05:57 PM

I'll pick the baton and run a little from here if you like.

Here's a funny experiment which certainly works in Linux but may not work in WIndows (haven't tried it).

Rename an mp3 file:

mv Who\ The\ Seeker.mp3 Who\ The\ Seeker

and then run it:

mpg123 Who\ The\ Seeker

and it works just the same. Xmms doesn't need the extension either - it will still load it all the same and recognise it as an mp3 without it. But if it does have the extension then you (or the window manager) can associate it with a certain application - much as you have to do occassionally when Windows forgets what files go with what programs.

Linux uses a device file notation. In Linux, everything is a file. Even your harddisk /dev/hda is a file. have a look in your /dev/ directory and you'll see lots of entries like

hd0 hd1 hd2 hd3 hd4 hd5 etc. etc.

Your system doesn't necessarily use these but if you add on another IDE disk, it might which is why they're there. I'm not sure if ghost can read ext2 partitions - why do you want to ghost them? Is it to save time installing to multiple workstations or to "sysprep" them?

Bert

mhearn 02-17-2003 04:58 AM

GNOME and KDE use fairly complex mechanisms for determining filetypes.

In particular, they use mimetype sniffers - ie they actually examine the file itself to determine what file type it is, and they use mimetypes instead of file extensions. KDE and GNOME apps are therefore much more independant of extension that Windows is.

Linux binaries tend not to have extensions, but sometimes you may see files ending in ".sh", which is like .bat on Windows. That's not actually necessary, nor is it a convention that is always followed - use the "file" command to find out what something is. ie:

[mike@littlegreen mike]$ file /usr/bin/metacity
/usr/bin/metacity: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
[mike@littlegreen mike]$ file /usr/bin/ldd
/usr/bin/ldd: Bourne shell script text executable
[mike@littlegreen mike]$ file riva.mp3
riva.mp3: MP3, 64 kBits, 22.05 kHz, JStereo

mhearn 02-17-2003 04:59 AM

and of course.......

[mike@littlegreen mike]$ mv riva.mp3 riva.foobar
[mike@littlegreen mike]$ file riva.foobar
riva.foobar: MP3, 64 kBits, 22.05 kHz, JStereo


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