LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I'm lost???? (https://www.linuxquestions.org/questions/linux-newbie-8/im-lost-233658/)

Umanga 09-22-2004 12:01 AM

I'm lost????
 
Hello guys!
I'm new to linux and I got bunch of questions!
1] In windows we can find the installed programs usually under "Program
Files" folder! What about in Linux
And what about the links in Start-Menu programms.Who can I find the
target application of a link.

2] What is the executable file extension in linux. Do we have to use .\xxx
to run a specific program?

3] In windows we know the libraries are normally .DLL .OCX and they can
be found in Windows\System32 folder. what about in linux

4] Is there similar thing like windows Registry in Linux?

5] When I install a RPM what happens? What is the folder that files are
copied?

thanks

btmiller 09-22-2004 12:14 AM

Some answers:

1) binaries generally go into /bin (system utilities), /usr/bin (stuff installed from packages), and /usr/local/bin (stuff you compiled). For stuff you compile yourself, it's customizable, though, and there's no reason an executable has to go into one of these directories -- it's just something of a convention.

2) File extensions are a DOS-ism.

3) Libraries are .so (for dynamic e.g. the Linux equivalent of a .dll) and .a for static libraries. They usually go into /lin, /usr/lib, /usr/local/lib. Same idea as executables.

4) No, thank goodness.

5) Most RPMs install their stuff into /usr, see above.

It would help if you didn't try to think of Linux in terms of Windows. It's a completely different operating system with a completely different heritage. While there are commonalities between Windows and Linux, trying over-hard to find parallels will probably just confuse you.

jax8 09-22-2004 12:18 AM

1] In windows we can find the installed programs usually under "Program
Files" folder! What about in Linux
And what about the links in Start-Menu programms.Who can I find the
target application of a link.


In linux programs are installed all over the place. For example all binary files (like exe files in windows) are installed into /bin or /sbin or /usr/bin or /usr/sbin or even other locations.

If you are using KDE right click on the menu and select "menu editor" this program will show you the links and you can also add extra links.


2] What is the executable file extension in linux. Do we have to use .\xxx
to run a specific program?

Extensions no not matter in linux. you can find out what type the file is by running

file NameOfFile

in a terminal

3] In windows we know the libraries are normally .DLL .OCX and they can
be found in Windows\System32 folder. what about in linux

again linux installes stuff everywhere however most commonly these sorts of files are storred in the "lib" directories. You will notice that there are a few of these around the directory structure.

4] Is there similar thing like windows Registry in Linux?

No registry.

5] When I install a RPM what happens? What is the folder that files are
copied?

RPM's are like setup files in windows. It will install everything to the places that are necessary for the application to work. For example it may install the executable to /bin the library files to /usr/lib and user specific stuff to /home/yourname/.applicationName. RPM's are very powerful because you can upgrade them, uninstall them, query them and a whole lot more.

type

rpm -qa

to see all the rpms of you system

type

rpm -qa | grep vi

to see if vi is installed on your system

rpm -ql vi

to see what files belong to the vi package (then you know exactly what files were installed by the vi rpm)

When you compile source code it will not show in the rpm database. If you want to compile programs yourself I would suggest installing check-install. it is a program that will build rpms from the source code for you.

melinda_sayang 09-22-2004 12:19 AM

1. The program in linux usually scattered around the system. So it is insane to uninstall the programs in linux by deleting manually. That's why people make rpm, pkgtool, ebuild, deb, to make install and uninstall easier.

2. There is no extension. You don't have to. I can run the program like this.
$ thunderbird

3. Usually with extension .so. You can find in /usr/lib, usr/local/lib, and etc.

4. Nope

5. Ok, I make a program. Here is the file:
blabla
blablabla.png ( it need this picture )
blablabla.so
To install my program, you have to copy blabla to /usr/bin, blablabla.png to /usr/share/blabla/data/, blablabla.so to /usr/lib. But I make the rpm for my program. Then when you install my program like this:
rpm -i blablabla.rpm

The rpm install my program by copying.... automatically. If you want to uninstall, you can delete my program files manually but that is insane. What if my program has more than 100 files? rpm do that for you.
rpm -e blablabla
Hopla, my program files dissappear from your system.

Got it?

hw-tph 09-22-2004 12:29 AM

Quote:

In windows we can find the installed programs usually under "Program Files" folder! What about in Linux
And what about the links in Start-Menu programms.Who can I find the target application of a link.
In Windows the directory structure is very loose compared to Linux. In Linux executables go in one directory, libs in another and configuration files in a third. The executable files themselves usually live in /bin, /usr/bin and /usr/local/bin and configuration files in /etc (read on for the libraries). You can also defined more directories to search for executables by adding them to the $PATH environment variable (just like in Windows). One common directory to add in addition to the bin dirs I already mentioned is ~/bin (the "bin" dir in the user's home directory).

Links and menus are not Linux-specifc. This depends on what program's menu you're talking about - Gnome has one way of doing it, KDE one, Enlightenment one, Openbox one....and you get the idea.

Quote:

2] What is the executable file extension in linux. Do we have to use .\xxx
to run a specific program?
In Linux the file extension doesn't have anything to do with executability. Making a file executable is a matter of changing the permissions on it. You can set execute permissions for the user who owns it with chmod u+x filename, for group members using chmod g+x filename. Type man chmod for the chmod manual page.

Quote:

3] In windows we know the libraries are normally .DLL .OCX and they can
be found in Windows\System32 folder. what about in linux
Libraries usually live in /lib (for system critical libs), /usr/lib (most application libs) and /usr/local/lib (locally built libs). The file extension is usually .so.

Quote:

4] Is there similar thing like windows Registry in Linux?
The /etc directory contains most global (i.e. non user specific) configuration files, so that's a good start. But no, there is no registry in Linux and that is generally considered a good thing. Some applications implement a mini-registry of sorts - Gnome has its own and there is a graphical editor for it as well.

Quote:

5] When I install a RPM what happens? What is the folder that files are
copied?
That is defined in the RPM itself. Refer to the RPM documentation for more info.


Håkan

Umanga 09-22-2004 12:45 AM

well....
 
Thanks guys, for the support.
But why you say windows directory structure is loose? Well NTFS have a good security and I think the windows directory structure is more managed than linux.
It is easier to find something we want:
For example all the installed programms are in subdirectories (inside Program files) ..etc I mean its neat isn't it? I mean more user freindly!

dalek 09-22-2004 01:30 AM

NTFS is the file system on the hard drive, not how the files in the OS are structured. Windoze does not have /etc for config files, /mnt for the floppy and cdrom etc, /home for user directories. Those two are totally seperate things.

Example, I just got a new hard drive. When I bought it, it had no file system at all on it. I partitioned the drive and put reiserfs on it. You could have just as easily put NTFS on the drive. Those are how the drive keeps up with the files on the drive. It is sort of a internal thing.

The file structure is how the OS keeps up with the file structure. root or / is the start point in Linux, C: is the start point for windoze. Then there are directories from there which is the structure for the OS.

Sort of hard to explain. If you try to compare Linux and windoze, you are in for a long learning curve. This is like comparing a cave to looking into the sun.

Hope that help and don't confuse to much.

:D :D :D :D

amosf 09-22-2004 02:29 AM

Re: well....
 
Quote:

Originally posted by Umanga
Thanks guys, for the support.
But why you say windows directory structure is loose? Well NTFS have a good security and I think the windows directory structure is more managed than linux.
It is easier to find something we want:
For example all the installed programms are in subdirectories (inside Program files) ..etc I mean its neat isn't it? I mean more user freindly!

unix/linux/etc is more structured. You just don't understand or know the structure yet. Once you do it's more clear...

In linux you also know where to find binaries - they are in the various bin directories. You also know to find config in /etc - and you can read all the files with any editor :) You know where the libs are, etc...

And you can always be sure that all your data is stored in /home/username and not is some hidden place you don't know about when you go to backup and install a new OS... with linux you can leave /home partition alone, knowing it has the data, and install a new OS in the root partition.

With linux you also don't have the confusing c: d: e: DOS leftover. With linux the filesystem is one tree. /mnt/cdrom can always be /mnt/cdrom if you want, regardless of where it's actually physically atached. It can even be on another PC as far as linux is concerned - same with any of the filesystem...

It's different and the filesystem will always take some getting used to if you come from the winDOS world as the system there is based on a floppy drive while linux is based on mainframe unix machines...

mjjzf 09-22-2004 02:43 AM

My preferred feature has always been the ability to call up a window, type the name of the program you need - and it just starts.

bosewicht 09-22-2004 03:41 AM

the only reason u may think windows is more "user friendly" is b/c it is the OS u are use to running. After a while u will look at windows and think diff.

mirradric 09-22-2004 04:17 AM

Precisely. Now that i've gotten into the habit of highlighting to copy and middle clicking to paste, I almost always do the wrong thing on windows. Why is windows so unfriendly... lol

Quote:

Originally posted by bosewicht
the only reason u may think windows is more "user friendly" is b/c it is the OS u are use to running. After a while u will look at windows and think diff.

Netizen 09-22-2004 06:59 PM

Quote:

Originally posted by mirradric
Precisely. Now that i've gotten into the habit of highlighting to copy and middle clicking to paste, I almost always do the wrong thing on windows. Why is windows so unfriendly... lol
Me too! I cant figure out how i ever lived without it... Nothing worse than highlighting, closing the window, and then trying to paste with the middle button in windows. Then realizing you will have to find that line again....

darthtux 09-22-2004 09:55 PM

You can type
whereis command_name
to find out what directory a command is in or
whatis command_name
to get a one line summary.

BTW, have any of you caught yourself typing :w in notepad? ;)

dalek 09-23-2004 12:49 AM

Quote:

Originally posted by darthtux

BTW, have any of you caught yourself typing :w in notepad? ;)

What does :w do? Is that a vi thing?

Later

:D :D :D :D

mirradric 09-23-2004 12:33 PM

I use pico/nano and i caught myself doing ctrl-e and ctrl-a (which works for shells as well) recently. And netscape uses ctrl-e to start composer....


All times are GMT -5. The time now is 03:05 AM.