Operating System( 操作系统) Lab实验1

208 阅读1分钟

1. Requirement

A) Login and logout in Linux system

B) Know how to compile C files in Linux system

2.Basic process

2.1 Create an account named OS+SID

  1. Attention: adduser: To avoid problems, the username should consist only of letters, digits, underscores, periods, at signs and dashes, and not start with a dash

sudo adduser OS+SID

image.jpeg

  1. change the permission for new account
    #usermod -g root os212

  2. login new account
    su name

  3. switch to root dictinary cd

  4. create a new folder mkdir lab1

  5. change the access rights to that folder chmod 740 lab1

there exist 3 type of accessing the floder
a) read 4
b) write 2
c) execute 1

7 means user can read, write, execute the folder 4 means group user can only read 0 means others can do nothing to this folder

 

3.Program results

Screen Shot 2022-03-03 at 11.37.42.jpg

Screen Shot 2022-03-03 at 11.34.41.jpg

Screen Shot 2022-03-03 at 10.50.59.jpg    

4.Conclusion (Learning and Thinking)