logoalt Hacker News

XorNottoday at 8:24 AM5 repliesview on HN

It has never been easy to create separate users on Linux, certainly not for tasks where you need to switch between contexts.

Docker was amongst the biggest steps forward on this in a long time.


Replies

progvaltoday at 8:42 AM

I meant for CLI tasks. Just "adduser" and "sudo -u <user> bash".

show 1 reply
vladmstoday at 9:11 AM

I do not know since when (I am using it for couple of years), but in Arch, it is very simple to have two X sessions (by using "log out" > "switch user") for two different accounts, so switching it's just a Control-Alt-F7 away.

Additionally, one can make the main user part of the group of the development user, so that you can read/write easy in the development user account and it is even easier to share stuff.

show 2 replies
j-bostoday at 9:45 AM

While I agree, containerization is awesome, on linux, you can just create a devUser and `sudo devUser theThing`

show 1 reply
consptoday at 8:44 AM

sudo useradd -m [username] ?

su [username] ?

Or am I understanding your idea about switching context wrong?

show 1 reply