holiday12
2024-09-08 16:30:05
holiday12--linux basis
super user(root)
- In linux, account root usually use for system maintain and managerment ,it has all access permission for all resources of system
- In most linux system version,not recommended use root account log in system directly
sudo
su
is abbreviation ofsubstitute user
, repersent use another usersudo
command used to execute commands in othter user , default identity isroot
group managerment command
tips:add/delete group must execute as root
add/delete group
command | action |
---|---|
groupadd [group name] |
add group |
groupdel [group name] |
delete group |
cat /etc/group |
make sure group information |
chgrp -R [group name] [file/directory] |
recursive modify the group of file directory |
user managerment command
tips:add/delete user or modify other users password must execute as root
add/delete user and change password
command | action | description |
---|---|---|
useradd -m -g [grup] [new user] |
add new user | -m automatically create home directory, -g appoint the user's group, otherwise will create a group which has same name with user |
passwd user | set user's password | if you are normal user, you can use passwd command to change password directly |
userdel -r [user name] |
delete user | -r option will delete home directory automatically |
cat /etc/passwd | grep [user name]
#make sure user's information
最新文章
- 自然语言20_The corpora with NLTK
- VC++ 用setsockopt()来控制recv()与send()的超时
- Win7下安装配置gVim
- NSEnumerator
- HDU 3667 费用流(拆边)
- Android如何区分app原生和webview实现
- 如何在ubuntu 12.04 中安装经典的 GNOME桌面
- android中判断sim卡状态和读取联系人资料的方法
- shallow copy &; deep copy
- Hibernate 主键策略
- AJAX 跨域
- Python代码一定要对齐
- sql server 2005导出数据
- Lucene全文搜索之分词器:使用IK Analyzer中文分词器(修改IK Analyzer源码使其支持lucene5.5.x)
- RESTful服务最佳实践
- 201621123043 《Java程序设计》第3周学习总结
- python中的赋值与深浅拷贝
- 使用cURL尝试ElasticSearch
- Jupyter中python3之numpy练习
- Luogu P3455 [POI2007]ZAP-Queries
热门文章
- js动态删除添加一行
- 15. 测试环境部署-linux
- 快速确定execl 列数
- kumquat
- ubuntu新建的用户的终端前不能/没有显示路径
- K8S-PV和PVC
- xss-labs
- [部署日记]GO在Visual Studio Code初次运行时提示The ";gopls"; command is not available. Run ";go get -v golang.org/x/tools/gopls"; to install.
- <;string>; <;cstring>; <;string.h>;
- satpy 处理卫星 FY4A 数据