How can I install programs for a single user instead of it installing for both?

BoringZombie

Active Member
Joined
Apr 1, 2021
Messages
365
Reaction score
185
Credits
2,510
I want to install some programs just for one user and not both.
 


Brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
2,409
Reaction score
1,620
Credits
18,087
This is outside my normal area ,
you would normally set up multiple accounts [and not share YOUR password with the other user]
the way to set up additional users will depend on your build of Linux and your desktop environment,
so before one of our wizkids in the know jump in to help please state your build [EG. mint/linuxlite/etc] and your desktop [EG . kede, cinnamon , mate/ etc]

Bwiz
 
OP
BoringZombie

BoringZombie

Active Member
Joined
Apr 1, 2021
Messages
365
Reaction score
185
Credits
2,510
This is outside my normal area ,
you would normally set up multiple accounts [and not share YOUR password with the other user]
the way to set up additional users will depend on your build of Linux and your desktop environment,
so before one of our wizkids in the know jump in to help please state your build [EG. mint/linuxlite/etc] and your desktop [EG . kede, cinnamon , mate/ etc]

Bwiz
They are both my accounts for different uses. But when I do 'sudo apt install' on one user account it installs the programs on the second.
 

Fanboi

Well-Known Member
Joined
Apr 16, 2021
Messages
379
Reaction score
293
Credits
4,492
They are both my accounts for different uses. But when I do 'sudo apt install' on one user account it installs the programs on the second.
It is supposed to do this. When you run a package manager, you are installing things system-wide and this makes your OS stable. It lets applications share libraries, it ensures consistency, and many other wonderful things UNIX brought us. I won't go into the history, but read up on the concepts if you're interested.

IDK why you wanna install apps to per-user, but here are some newbie-to-intermediate-friendly options...

Simplest:

One of the most prevalent options is Flatpak. This lets each user install their own isolated apps. There are some security advantages and disadvantages, the latter outweighing the former, but if you are a normal user and not trying to steal data from the NSA or wearing a foil hat, this will be a good newbie-to-intermediate-user option. Personally, I don't use Flatpak, but I can afford not to because I have my own methods. Anyway, in short, Flatpak is installed system-wide, but is run by the user, not root (no su or sudo) and each user installs their applications locally as a user. Flatpak still acts like a package manager, except it is limited by not being able to share between users. Say user 1000 has a flatpake of Progam installed, user 1001 will install their own separate copy of Program. This uses lots more disk space because resources now cannot be shared between users.

Another approach:
(Variables on a per-user basis)

- Create a local "bin" directory. Example: $HOME/usr/bin/
- Now just add wherever you chose to PATH on login. Example, put this in $HOME/.profile and/or $HOME/.bashrc (depending on your system and shell, obviously): PATH="$PATH:$HOME/usr/bin".
(Watch the colon separator has no spaces and there's no trailing slash.)
- Okay, you now have a working local bin directory. Anything you want to run from there must be eXecutable (chmod +x /path/to/item). This is fine for single applications like .Appimages and scripts and the odd Python game. But you won't be using your/a package manager for this.

Conclusion:


Since you haven't explained WHY you want to do this, it's hard to give you a better answer than this. Hope that helps.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Staff online

Members online


Top