Linux simple commands

Source: Internet
Author: User

Useradd Username adding users

Useradd-g GroupName Uername

passwd Zhaoyuanyuan Add a password to the added user, you can also reset the password

~ Wavy lines represent home directories

CD ~ Quick Home Catalogue

SU Username Switch directory

Su-username Switch directory (reload user's environment variable)

Userdel Username Delete a user

Userdel-r XW Delete the user's home directory when it is deleted

Groupadd name Add Group

Groupdel name Delete Group

PWD Displays the current path you are in

mkdir FileName Create folder

Mkdir-p/tmp/besttest/blk

RM-RF/Delete Folder

RmDir only empty folders can be deleted

Ls-l = = ll See what's Under the folder

MV Besttest Linux folder renaming

MV Besttest/tmp Move Folder replication

CP ax/tmp/Copying files

Cp-r linux/tmp/Copy Folder

CP-RF Linux

Cd.. #回到上一级目录

Cd.. /.. /#回到上两级目录

CD-Return to the previous directory

chmod o+x Other users

chmod g+x This group of users

chmod u+x Himself

chmod +rwx All

chmod a+x All

(Remove the permission, that is, to turn + into-)

R=4 w=2 X=1

chmod 755 File

chmod 755 File If you add the permission to a folder, add-R

Chown file User If it is a folder, add-R

CHGRP file group if it is a folder, add-R

Wc-l file Count rows

(| pipe break: Connect two commands, execute the result of the previous command to handle the following command)

&& connection two commands, successively executed

...


Linux simple commands

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.