Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 5845  / 1 Year ago, sun, march 19, 2023, 9:20:15

I am not a pro in Linux and I was thinking that where does the files get stored when I do apt-get install.



I understand that different linux distributions do things differently, but I am taking a generic case here.



I read the RUTE documentation, and other answers on stackexchange.



Now, my question is that say I have two users A and B.



This means, I will have two directories /home/A and /home/B (RIGHT?)



Now, if user A installs anything, none of the installation go in the home directory. But they are installed in /usr directory.



Now, the binary file will go in /usr/bin If it uses any libraries that goes in /usr/lib etc etc. (RIGHT?)



So, if I login as B and try to run the program installed by A,




  1. Will I be able to run it? what all factors determine that.

  2. How does the system differentiate that what softwares installed in /usr are installed by which user. I am assuming that if user B now installs something else, then all the data related to that will also be in /usr/ directory (RIGHT?)

  3. Also, any of the packages installed by any of the user do not go in /bin folder right? That is specific to system binaries.

  4. What if there are no users on my system. Will there be no files in /usr folder? ie in my office, when I remote login to a server, it shows no user in home directory.



Thanks.


More From » filesystem

 Answers
2

Will I be able to run it? what all factors determine that.




Yes. But there a no factors? If it is there is can be executed. If an admin wants to prevent execution (s)he needs to use a tool to block access (acl is one of those tools).




How does the system differentiate that what softwares installed in /usr are installed by which user.




It does not and does not need to. The admin installs the software, the users use it and by default with no restrictions.




I am assuming that if user B now installs something else, then all the data related to that will also be in /usr/ directory (RIGHT?)




If B is a normal user he is unlikely to be able to install since he will need the admin password. If A and B are admin then the admin installs software (it does not matter if that admin is user A or user B).



Software that needs to store settings or data will store this in the users home. The software is installed once but the user content (settings, personal data) is shared over all of the users /home's.




Also, any of the packages installed by any of the user do not go in /bin folder right? That is specific to system binaries.




Yes. /bin is supposed to be clear of any non-system binaries. But is depends on what is installed: it could be software that has a system binary and that will end up in /bin or /sbin if applicable.




What if there are no users on my system. Will there be no files in /usr folder? ie in my office, when I remote login to a server, it shows no user in home directory.




That does not mean there are no users. If you remote login on my server I would shield my /home/ from you.



Every Linux system MUST have at least 1 user. At a minimum there must be an admin (could be root or a normal user with sudo permissions).


[#23280] Tuesday, March 21, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
damomnning

Total Points: 422
Total Questions: 90
Total Answers: 106

Location: Mali
Member since Thu, Aug 13, 2020
4 Years ago
damomnning questions
;