๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
โœ’๏ธ Linux Programming/with VMware Workstation

[Linux & VMware Workstation] Day 3 : ๊ณ„์ • ์ •๋ณด ํ™•์ธ ๋ช…๋ น์–ด์™€ LogIn & Out ๋ช…๋ น์–ด

by A Lim Han 2022. 3. 29.

1. ctrl, alt, f1์„ ๋™์‹œ์— ๋ˆŒ๋Ÿฌ tty1๋กœ ์ด๋™.

2. user1์œผ๋กœ ๋กœ๊ทธ์ธ

3. w, who, who am i, whoami ๋ช…๋ น์–ด๋ฅผ ์ฐจ๋ก€๋กœ ์‹คํ–‰.

 

4. user1 ๊ณ„์ •์—์„œ user 2๊ณ„์ •์„ ๋งŒ๋“ค์–ด๋ณด๋ ค๊ณ  ํ–ˆ์œผ๋‚˜ ์‹คํŒจํ•จ

5. ๋‚ด ๋ณธ๊ณ„์ •์ธ hanalim ์œผ๋กœ ๋“ค์–ด๊ฐ€์„œ sudo ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•จ -> user2 ๊ณ„์ • ๋งŒ๋“ค๊ธฐ ์„ฑ๊ณต

 

6. user2 ๊ณ„์ •์œผ๋กœ w, who, whoami, who am i ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ -> ์˜ค์ง whoami๋งŒ user2๋กœ ์ถœ๋ ฅ๋œ๋‹ค. ๋‚˜๋จธ์ง€๋Š” ๋ชจ๋‘ user1์„ ๋‚˜ํƒ€๋‚ธ๋‹ค.

7. ์œ„์™€ ๊ฐ™์ด user1๊ณผ user2 ์œผ๋กœ ๊ฐ๊ฐ w, who, whoami, who am i ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•ด ๋ณด์•˜๋‹ค. 

 

 -> ๋จผ์ € w ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•ด ๋ณด๋ฉด, user1์œผ๋กœ ์ ‘์†ํ–ˆ์„ ๋•Œ์™€ user2์œผ๋กœ ์ ‘์†ํ–ˆ์„ ๋•Œ์˜ ์‹คํ–‰ ๊ฒฐ๊ณผ๊ฐ€ ๊ฐ™๋‹ค. ๋‘ ๊ฒฝ์šฐ ๋ชจ๋‘ ๋กœ๊ทธ์ธ ์‹œ๊ฐ„๊ณผ user์˜ ์ด๋ฆ„, ๊ทธ๋ฆฌ๊ณ  PCPU WHAT ๋“ฑ์˜ ์š”์†Œ๊ฐ€ ์ถœ๋ ฅ๋œ๋‹ค.

 

-> ๋‘ ๋ฒˆ์งธ๋กœ who ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•ด ๋ณด๋ฉด, user2์˜ ๊ฒฝ์šฐ ํ˜„์žฌ ๋กœ๊ทธ์ธ ๊ณ„์ •์ด ์•„๋‹Œ user1์˜ ์ด๋ฆ„์ด ์ถœ๋ ฅ๋œ๋‹ค. ํ•˜์ง€๋งŒ user1์˜ ๊ฒฝ์šฐ ํ˜„์žฌ ๋กœ๊ทธ์ธ ๊ณ„์ •์˜ ์ด๋ฆ„์„ ์ถœ๋ ฅํ•œ๋‹ค. ํ›„๋ฐฉ์˜ ๋กœ๊ทธ์ธ ๋‚ ์งœ๋Š” user1๊ณผ user2 ๋ชจ๋‘ ๋™์ผํ•˜๊ฒŒ ์ถœ๋ ฅ๋˜๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

 

-> ๋‹ค์Œ์œผ๋กœ who am i ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•˜๊ฒŒ ๋˜๋ฉด, user2์˜ ๊ฒฝ์šฐ who ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ–ˆ์„ ๋•Œ์™€ ๋™์ผํ•˜๊ฒŒ ํ˜„์žฌ ๋กœ๊ทธ์ธ ๊ณ„์ •์ด ์•„๋‹Œ ๋‹ค๋ฅธ ๊ณ„์ •์ธ user1์˜ ์ •๋ณด๋ฅผ ์ถœ๋ ฅํ•œ๋‹ค. user1์˜ ๊ฒฝ์šฐ, ์ด์ „๊ณผ ๋™์ผํ•˜๊ฒŒ ํ˜„์žฌ ๋กœ๊ทธ์ธ ๊ณ„์ •์˜ ์ •๋ณด๋ฅผ ์ถœ๋ ฅํ•œ๋‹ค.

 

-> ๋งˆ์ง€๋ง‰์œผ๋กœ whoami ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•˜์˜€์„ ๊ฒฝ์šฐ, user1๊ณผ user2 ๋ชจ๋‘ ๊ฐ๊ฐ ํ˜„์žฌ ๋กœ๊ทธ์ธ ์ค‘์ธ ๊ณ„์ •์˜ ์ •๋ณด๋ฅผ ์ถœ๋ ฅํ•œ๋‹ค๋Š” ๊ฒƒ์„ ์•Œ ์ˆ˜ ์žˆ๋‹ค.