Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 31

Thread: How does linux run programs?

  1. #11
    Senior Member registered user
    Join Date
    Feb 2003
    Posts
    929
    Here . just means "the directory". Let's put it another way. If a file/program is executable and in your path and you have permission to execute it you can execute it from anywhere.

    On the other hand, if it's not in your path you need to execute it as follows:

    ./my_program (and it's easier to do it from within the directory).

    The ./ basically tells the shell "hey, don't wander off searching the path, just run the program that's in this directory".

    Generally, executables will be found in directories like /bin and /sbin.

  2. #12
    Senior Member registered user
    Join Date
    Nov 2003
    Posts
    361
    Quote Originally Posted by FreeTheCheese
    Only if "." is in your "PATH" environment variable.
    do you mean if the file was named ' .myexcutable ' ?
    No

    Quote Originally Posted by fingers99
    Here . just means "the directory"
    Yes, "." means the current directory. It is usually not in the path because you normally want commands to run the same program regardless of where you are (unless you specifically tell it to use the current directoy by adding "./" before the name of the program)
    You can check your path settings this way:
    Code:
    echo $PATH
    Usually you don't see a "." in there. If you really want it to look in the current directory too (I don't recommend it) you can do this:
    Code:
     export PATH=$PATH:.

  3. #13
    Senior Member
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    157
    Personally I think installing applictaions in Linux sucks hoss! I tried to install two things a few days ago. I tried to get it to work for 13 hours and it still wouldn't work. There is still too many picky problems with Linux to make me enjoy the experience.

    I agree that windows .exe is a problem because you can get virus problems and stuff from an .exe just by double clicking the wrong one. But that is easy to overcome. (Just don't install P2P or cracks!)

    Linux has .deb, .rpm, apt-get, make, make install, ./configure, all of which I haven't got a clue on which one to use with which distro! It would be a great world to have a small unified installer that works! One that allows you to choose where to install, which rights to have with whom, and is it an upgrade or a fresh install!

    There are great benifits to all the distros out there, but the simple things get complicated!

    All I want to do is try a program I found, to see what it looks like, but I can't! Even the insall instructions don't work. I followed them EXACTLY and I keep getting errors. I have tried two distros.

    I would love to have three things in Linux:
    A single "working" installer that everyone can use. Even if it is an installer program that takes packages and installs them.

    To grasp the file system. I still can't make sense of the way the file system is set up. With widows it is easy. There is a partition. The partition has a file system. There are folders in the filesystem.

    With Linux there is / aka root, then there is /root !!! what the heck! plus /bin, /sbin, /usr, /others... But I can't find anywhere that makes it clear on where the partitions are and where the folders are. Is / a partition? or is /root the partition? Is there a map that I haven't found?
    Is there a logical seperation or a physical seperation between the "partitions" or is there a different rule altogether?

    The last thing I want is a Linux explorer that works like Windows Explorer! I think I use Windows Explorer the most, of all the applications and programs in my computer. For some reason Conqurer never saves the fact that I want a detailed view, or makes it easy to navigate where I want to go.

    Someone please help me find a gun?

  4. #14
    Junior Member registered user
    Join Date
    Feb 2003
    Posts
    18
    The last thing I want is a Linux explorer that works like Windows Explorer!
    That's the last thing I'd want, too. [/i]

  5. #15
    Senior Member
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    157
    OK that was funny, but in reality, I haven't had near as my navigational problems as I do in Conq.

    Like for example, I have a partition that I named "My Files" that I have made to keep all my important documents and files. Within that partition I have "My Pictures", "My Office Notes", "My ..." and so on.

    If I wan't to back up my important files I can just back up the entire partition. My probelem is I can't figure out the file system with Linux. Thus not able to navigate like I can in Explorer.

  6. #16
    Junior Member registered user
    Join Date
    Feb 2003
    Posts
    18
    here is a guide to the filesystem, hope this is useful..
    http://www.qvctc.commnet.edu/classes...nux_files.html

  7. #17
    Senior Member registered user
    Join Date
    Nov 2003
    Posts
    361
    Quote Originally Posted by hplasm
    here is a guide to the filesystem, hope this is useful..
    http://www.qvctc.commnet.edu/classes...nux_files.html
    Looks useful but some things do not apply to Knoppix, for instance: "/root – The root folder contains the kernel and other important system files".
    In Knoppix (and all other modern Linux distros I've seen) /root is just the home directory of the root user. The kernel is in /boot.

  8. #18
    Senior Member registered user
    Join Date
    Feb 2003
    Posts
    929
    I would love to have three things in Linux:

    A single "working" installer that everyone can use. Even if it is an installer program that takes packages and installs them.
    You have, if you've a Knoppix or Debian install, the best installer out there. It's called apt-get. There are even apt-gets for .rpm based systems.

    to install foo-bar, for example, you'd just connect to the internet, snap open a terminal, su to root and do:

    apt-get install foo-bar

    there's a good, but not yet completely able to do everything the command line can, GUI front end to apt-get called synaptic:

    apt-get install synaptic


    To grasp the file system. I still can't make sense of the way the file system is set up. With widows it is easy. There is a partition. The partition has a file system. There are folders in the filesystem.
    I think that's only two things! In Linux there are partitions, in the partitions are directories, in the directories are files.

    I doubt if anyone who has seen the paths XP comes up with would argue that Linux has a complicated, illogical file system!

    The simple answer to installation issues is apt-get: there's no real point in a newbie getting involved in installs from source or trying to convert .rpm based packages to run on a Debian system.

  9. #19
    Senior Member registered user
    Join Date
    Jan 2004
    Location
    Paris, France
    Posts
    203

    For hunkah

    Hunkah,
    What you seem to be missing is an understanding of disks/partitions and filesystems.

    In reality Linux(UNIX) is FAR simpler than Windows. Your just not used to seeing it this way.

    Linux also carries forward compatibility with DOS/Windows partitions.
    You have a disk controller, usually two

    These are the primary and the secondary controller.
    For an IDE drive (not serial ATA) each has a possibility to have two devices called master/slave. They aren't called that for nothing and the limitaitons of this are inherent to IDE.

    On the Primary you have master/slave = hda and hdb
    On the secondary you have master/slave = hdc and hdd

    So each of these is a physical disk (or CDROM etc)

    A disk needs a filesystem and a file system needs a partition. Well theoretically not but in order to maintain WinBlows compatibility Linux caters for this.

    Each disk in DOS can have a maximum of four primary partitions.
    In linux these are hda1,hda2,hda3,hda4 ....
    However in DOS you can also have an extended partition ... and this can contain partitions itself.....
    Linux names these hda5,hda6 etc....

    Remember don't blame linux, its only doing this so not as to wreck your windows install. DOS/Win98 etc can ONLY boot from the first partition and that partition MUST conform to rules (like the cylinder <1024)

    Linux doesn't have any limitiations except what it does to maintain DOS compatibility.... it can boot from any partition equally.

    Each partition has a filesystem....again windows/DOS is limited but linux isn't. So you choose an appropraite filesystem.... its not that hard, very few filesystems are as BAD as FAT, in fact FAT isn't really a proper filesystem.


    Each filesystem contains directoires and files
    Like for example, I have a partition that I named "My Files" that I have made to keep all my important documents and files. Within that partition I have "My Pictures", "My Office Notes", "My ..." and so on.
    Would lead me to beleive that what you are referring to is a directory.


    In UNIX a filesystem is not a limitiation, nor is a different disk or partition.
    UNIX has a single 'logical' filesystem. "/"

    My probelem is I can't figure out the file system
    It appears you don't understand what a filesystem is.
    A filesystem is just a set of rules for reading/writing data to a block device. (like a disk)

    / can be a single partition on a single disk OR 100 partitions on different disks not even on the same computer. It doesn't matter, its transparent.

    If the different partitions have different filesystems, it again doesn't matter, its transparent. Indeed a filesystem is just a filesystem....
    If you have an .iso file you can mount it in linux as a loopback device and just use it like any other filesystem, same if its on another computer.

    You can organise this however you like....
    /mnt is created in linux and is a easy place to create mountpoints to other filesystems.

    The directory structure seems to be confusing you.....
    /bin (executables for the kernel)
    /sbin (kernel executables FOR root user)
    /usr (local and user installed executables
    /local (machine installed executables for everyone)

    The reason for the seperation is simple....
    Your /usr directory might not be on that actual machine, you might want to create programs for your user on every machine.
    /local is for programs on that machine ONLY
    /usr/local is for user programs on that machine ONLY....
    /var is for things that change like log files etc.
    /home is where you keep your configuration and personal data files


    where programs install is down to three things....
    1) The intended place by the program writer
    2) An accepted place by the packager (Debian)
    3) Whatever the user/admin decide.

    Linux has .deb, .rpm, apt-get, make, make install, ./configure, all of which I haven't got a clue on which one to use with which distro! It would be a great world to have a small unified installer that works! One that allows you to choose where to install, which rights to have with whom, and is it an upgrade or a fresh install!
    That thankfully isn't going to happen becuase Linux is Opensource.
    Unlike Microsoft people who write and license programs get to say how they are distributed.

    For example QMail (a mail server that makes exchange look like a dangerous toy) can ONLY be distributed in source code.
    That is the wish of the person who wrote it.
    It MUST be installed into /var/qmail (by default)

    KDE or Gnome also have their default places....
    Distro's that mess with them tend not to work when they are upgraded!!!

    With Windows you get about 10 programs that integrate into Windows, the rest are not. The just install where they will and edit the registry....
    Most importantly they are all monolithic - that is they don't share common parts. If you install two CD writing progs they will both contain the Cd writing software but also the drivers and perhaps utilities like MP3 ripping.

    In Debian you have thousands of intergrated programs.
    When you install a Cd writer it installs a front end. Just the buttons and options. It uses a seperate program to read CD's and a different one to extract audio and another to rip mp3's...

    If you install a second Cd writing prog it can use the same 'helper progs' ..

    Equally you can choose which 'helper prog' it uses. bladeenc, lame etc.

    When you run a program, basically you just copy it to memory and start a process. when you install it, its up to the program,packager to decide HOW you run it.
    You can have any of:
    An icon on the desktop
    A item in the menu
    A link within the path or alter the path.
    or nothing, you add them youself.

    In short nothing limits you....
    If you add it to the KDE menu's don't expect it to run from a gnome or fluxmenu unless you add it.

    What program is it anyway!!!!!

  10. #20
    Senior Member registered user
    Join Date
    Dec 2003
    Location
    Salt Lake City, UT, U.S.A.
    Posts
    1,338
    First of all, GoWater, nicely put, excellent wording, and descriptions

    As for the "filesystem" structure, I tend to think of it "like" the old DOS prompt directory structure, its easy to follow then. (just with a "starting point" being slightly different:

    In DOS, a tree structure would look something like this:
    C:\DOS\SCSI\DRIVERS\CDROM\YAMAHA\SCSICD.SYS

    Whereas, if this same (which an extension would not be necessary, but for explanation purposes) above "tree" structure, in Linux/Knoppix/Debian/etc... would look like this:
    hda1/dos/scsi/drivers/cdrom/yamaha/scsicd.sys

    The only "wrinkle" in this theory, is that if hda1 was manually mounted, and not the operating system, it could have a "mount point" that adds to the first part of the string... Lets say that device hda1 has a "mount point" of /cdromdrives/archived - then the above Linux/Knoppix/Debian/etc... line of a translated DOS tree structure, would actually look like this now, with the mount point involved:

    /cdromdrives/archived/dos/scsi/drivers/cdrom/yamaha/scsicd.sys

    The whole "file system" in Linux/Unix/Debian/Knoppix/etc... is far more "advanced" than a "file system" in any Windows system. It can do more, it can be expanded more, and it has less "limitations", which are mostly placed on top of the "file system" by the operating system, than Windows systems have. And, lets not even get started on the security of Linux's file system, either - considering that if a file is made "global" to all users, it can get its "security" from an inherited folder, or device (hard drive). In other words, a device can be read-only, and ANY file, or folder, on the device is also read-only, even if the file has read/write access.

    This may be where a lot of people get stumped, I did, from the start. The whole "security" measures of Linux are in the "complete" tree structure. A file can have all user access read and write, but if the folder, or any of its parent folders, or the device, is not also read-write to all users, the it won't allow changes to even the file.

    I think Unix, and Linux, have a more powerful way of "locking down" a file system, than any other OS I have ever seen. (this is serious security, considering I had a heck of a time trying to get a few users ability to access a few files.)

    Oh well, I think I've said enough -=- graveyard shift, and way past my bedtime
    Cuddles

Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. where do i get wiz or other programs i can run exe with
    By sonicdragon14 in forum General Support
    Replies: 4
    Last Post: 12-11-2004, 06:25 PM
  2. Programs that just die
    By el_santo in forum General Support
    Replies: 0
    Last Post: 11-23-2004, 01:04 PM
  3. Two really needed programs
    By miguipda in forum Ideas
    Replies: 3
    Last Post: 06-29-2004, 02:07 AM
  4. Programs will not run
    By dvest in forum General Support
    Replies: 1
    Last Post: 08-14-2003, 06:40 AM
  5. Design Programs
    By thegroover in forum General Support
    Replies: 3
    Last Post: 07-08-2003, 09:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Dell PowerEdge R640 NVMe Server 2.10Ghz 8-Core 96GB 10x 1.6TB NVMe SSD HBA330 picture

Dell PowerEdge R640 NVMe Server 2.10Ghz 8-Core 96GB 10x 1.6TB NVMe SSD HBA330

$3133.65



HP Z820 8-Core 2.60GHz E5-2670 128GB RAM No HDD No OS picture

HP Z820 8-Core 2.60GHz E5-2670 128GB RAM No HDD No OS

$214.82



Intel - Core i7-13700K 13th Gen 16 cores 8 P-cores + 8 E-cores 30M Cache, 3.4... picture

Intel - Core i7-13700K 13th Gen 16 cores 8 P-cores + 8 E-cores 30M Cache, 3.4...

$364.99



Intel - Core i9-13900K 13th Gen 24 cores 8 P-cores + 16 E-cores 36M Cache, 3 ... picture

Intel - Core i9-13900K 13th Gen 24 cores 8 P-cores + 16 E-cores 36M Cache, 3 ...

$519.99



Intel - Core i9-12900K Desktop Processor 16 (8P+8E) Cores up to 5.2 GHz Unloc... picture

Intel - Core i9-12900K Desktop Processor 16 (8P+8E) Cores up to 5.2 GHz Unloc...

$331.99



Intel - Core i7-12700K Desktop Processor 12 (8P+4E) Cores up to 5.0 GHz Unloc... picture

Intel - Core i7-12700K Desktop Processor 12 (8P+4E) Cores up to 5.0 GHz Unloc...

$242.99



Intel Xeon E5-2667 V2 LGA 2011 3.3GHz 8 Core 130W 25MB 8GT/s CPU Processor picture

Intel Xeon E5-2667 V2 LGA 2011 3.3GHz 8 Core 130W 25MB 8GT/s CPU Processor

$24.00



AMD Ryzen™ 7 5700X 8-Core, 16-Thread Unlocked Desktop Processor picture

AMD Ryzen™ 7 5700X 8-Core, 16-Thread Unlocked Desktop Processor

$169.99



Dell Desktop Computer 16GB RAM 512GB SSD Intel Core i5 8th Gen. Windows 11 Pro picture

Dell Desktop Computer 16GB RAM 512GB SSD Intel Core i5 8th Gen. Windows 11 Pro

$250.00



HP RGB G3 Desktop Computer i7 32GB 2TB SSD 2TB HDD New 24

HP RGB G3 Desktop Computer i7 32GB 2TB SSD 2TB HDD New 24" LED Built-in Wifi Pro

$394.99