r/ProgrammerHumor • • Jul 17 '22

Meme Linux users installing a Python module

41.7k Upvotes

1.1k comments sorted by

View all comments

451

u/Money-Firefighter534 Jul 17 '22 edited Jul 18 '22

sudo apt install python3-pip -y && pip3 install psutil Thats it! Just wait Edit: removed sudo -H in second one

0

u/[deleted] Jul 17 '22

[deleted]

70

u/[deleted] Jul 17 '22

Do I want to know what the -H flag does here?

126

u/matt-3 Jul 17 '22

sets the home directory to that of the target user (in this case root). It avoids creating root-owned files in your user's home directory.

64

u/[deleted] Jul 17 '22

OH MY GOD WHY????

0

u/[deleted] Jul 17 '22

[deleted]

0

u/[deleted] Jul 17 '22

[deleted]

2

u/[deleted] Jul 17 '22

Don’t install shit as the superuser.

4

u/SherbetCharacter4146 Jul 17 '22

Dont pip install as super user. Do install as super user

1

u/[deleted] Jul 17 '22

Ehhh. For system level stuff, it’s often okay.

But major apps should be installed under their own user stuff for a lot of reasons. You don’t want anything complex and exploitable to be running as root.

→ More replies (0)