Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Where to install programs in a good way?

  1. #1
    Join Date
    Sep 2021
    Beans
    1

    Where to install programs in a good way?

    Hi I'm new to Ubuntu, I'd appreciate your help

    Regarding to my question, the reason I ask for is: I just installed ubuntu 20.04 LTS, I did it with 4 partitions:
    - / - 20GB
    - /boot - 1GB
    - /home - 100GB
    - And Swap

    Well based on this distribution or partitions, where should I install programs, for instance the files ending in .sh?

    Based on what I've read the right thing to do is to install them on /opt, however I think that if I do that I'd be using the partition '/' which has limited storage (20GB) and also in case I change my version or distribution of OS it could be affected. Please let me know if I'm wrong

    Therefore, taking in account those details, should I install programs on /home/username?

    Thank you so much for your help
    Last edited by fernand2226; September 25th, 2021 at 04:55 PM.

  2. #2
    Join Date
    May 2010
    Beans
    3,246

    Re: Where to install programs in a good way?

    I like to make /scripts and put my scripts there. You can add the folder to your PATH variable using ~/.bashrc

  3. #3
    Join Date
    May 2010
    Beans
    3,246

    Re: Where to install programs in a good way?

    You can install to $HOME if you want. It's a bit messy but will work.

  4. #4
    Join Date
    Apr 2007
    Beans
    3,114
    Distro
    Ubuntu

    Re: Where to install programs in a good way?

    Install programs using the software center: the system automatically takes care of proper location, integrates them in your application menu, sets up associations, and ensures you can remove it easily anytime.

    Install your own scripts in a directory "bin" or ".local/share/bin" in your home folder. Each of these folders will, next time you log in, automatically be included in your PATH. That means that you will be able to execute these programs and script by typing their name at the terminal.

  5. #5
    Join Date
    Aug 2011
    Location
    52.5° N 6.4° E
    Beans
    6,821
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Where to install programs in a good way?

    Most applications you install will (or should) be handled by your package manager (Ubuntu Software, apt, Synaptic, whatever tool you use) and that will decide where it will be installed. Or rather, the packager has decided, and usually it will be in your root partition. The standard location for your manually installed stuff, if you have any, would be in your home directory or in /usr/local.

    BTW, 20GB for your root partition is a bit small, but may work. I make it about 30GB. A /boot partition is only needed (and useful) in special cases, like when you have an encrypted system.

  6. #6
    Join Date
    Jun 2010
    Location
    London, England
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Where to install programs in a good way?

    I must be missing something.

    I last used Microsoft's Windows almost 20 years ago. So, things might have changed. But as I understand things, in Windows the user can choose a folder to install a program in. But in Linux we do not do that. When we use the install command or a GUI front end such as Ubuntu Software a program called dpkg does the actual work.

    The program/application files go in the / directory and related user files go in /home/username. The application's files or libraries are spread over several directories in / directory.

    This is why a / partition of 20 GB will be considered close to being too small to be useful if we intend to install additional applications/programs. On my system shell scripts used by the system are in /bin/. But they can go in other directories but we would need to change to that directory if we are going to run the script. Or put the path to the directory containing the script as part of the command.

    https://help.ubuntu.com/community/Be.../BashScripting

    I will accept that shell scripts are executable and are therefore technically a program. But this is a section of the forum for new users. And there is a another definition of the word "program" and with those type of programs/applications the user does not get a choice of where to install the "program." Lets us not confuse new users.

    Regards
    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530


  7. #7
    GhX6GZMB is offline Iced Almond Soy Ubuntu, No Foam
    Join Date
    Jun 2019
    Beans
    1,093

    Re: Where to install programs in a good way?

    @fernand2226
    Don't worry about this. 20 GB is plenty, you'll be surprised at how little space the applications take. I have LibreOffice, KiCAD, LibreCAD, GNU Octave, VLC Player, Opera, AVIDemux, and, and, and... installed and I'm at around 13 GB total on /. I could reduce this by placing the CAD libraries under /home instead (that's really where they belong), but have been too lazy until now. Then it would probably drop to 10 GB.
    Let Synaptic or muon or whatever install manager you're using do the placement. It works best that way.
    Your partitioning is good BTW. Congrats.

  8. #8
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Where to install programs in a good way?

    Just like ml9104, I am inclined to say that 20G should be enough for most users; in my 16 years of using Ubuntu or other DE versions (eg Xubuntu, Kubuntu) I have never had a root partition of more than 20G and have never once filled it with more than about 13G even though I also install a lot of programmes and packages, usually all from the repos. I have however installed both Plexmediaserver and Embymediaserver, both of which use quite a lot of space in root with their large databases of the mediafiles which they serve to client devices, eg smart-TVs.

    I am not a gamer, but I believe that games can use a great deal of space in the root partition if they are installed from the normal repositories, so if you are going to install lots of games you might wish to have a root partition that is larger, say 30G.

  9. #9
    Join Date
    May 2010
    Beans
    3,246

    Re: Where to install programs in a good way?

    Let's do this another way. What applications are you thinking about installing to other locations?

  10. #10
    GhX6GZMB is offline Iced Almond Soy Ubuntu, No Foam
    Join Date
    Jun 2019
    Beans
    1,093

    Re: Where to install programs in a good way?

    Quote Originally Posted by ActionParsnip View Post
    Let's do this another way. What applications are you thinking about installing to other locations?
    Good question. I think this is more the phase of getting out of the M$ mindset. I went through this myself a couple of years ago, and it takes a bit of time to get things turned around.

    Still, the OP has done a good job of partitioning and of identifying the issue. Applause from my side.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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