Linux Programming Notes (iv)

Source: Internet
Author: User
Tags parent directory disk usage

I. User and user group management

Add a new user account using the Useradd format useradd option username

1. Create a user Tian where the-d-m parameter is used for logging, the login generates a home directory/usr/tian (where/usr is the parent directory where the default user home directory resides)

2, create a user gem, the user login shell is/bin/sh belong to group groups, while belonging to the ADM and root user group, the command is as follows:

# useradd-s/bin/sh-g Group-g adm, Root gem

3, delete the account, the user account from the/etc/password system files such as the user record deleted, the use of the command as follows:

#userdel-r Sam Delete user account Sam's record in System files (etc/password/etc/shadow/etc/group)

4, modify the account use, the original account changed to a new user name, #usermod-S/bin/ksh-d/home/z-G developer Sam to change the user Sam's login name to Ksh home directory changed to/home/z user group to developer

5, User password management, user account has just been created without a password, but is locked by the system, can not be used, you must specify a password for it to use. Its shell command is passwd, the format passwd option + username, and its parameters are as follows:

6. Disk Management, Linux Disk Management main three parameters, DF: List The total disk usage of the file system, du: Check disk space usage. FDISK: Disk partition. Disk mounts using mount download umount.

Linux Programming Notes (iv)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.