How to learn Linux batch rename and basic linux commands in linux

Source: Internet
Author: User
Linux has seven run_level_number levels. you can use these seven runtime levels to perform the character interface, Gui, and other basic commands for switching linu inux to rename:
Linux rename and logout: logout
Log on to login again
Exit to exit the current user
Shutdown: shutdown + time for example: shutdown now (current, immediate shutdown)
Shutdown-c cancel all shutdown settings (shortcut: ctrl + c)
Restart the computer: shutdown-r restart time for example: shutdown-r
Reboot (immediate restart) is the same as shutdown-r
Linux has 7 running levels (run_level_number). you can use these 7 running levels to switch between character interfaces and graphic interfaces.
Linux rename: Shutdown 0
Single User 1
Multiple users (no network function) 2
Multiple users (all functions) 3
Retain 4
Character interface 3
Graphic Interface 5
Restart 6
The character interface command is init run_level_number. for example, init 5 enters the graphical interface.
User name creation/modification/deletion:
Create a new user: useradd username
Adduser user name
Set user password: passwd password
Change username: usermod username before new username
Delete User: userdel [-r] name (-r indicates deleting the user's default home directory along with deleting the user)
View help information:
Command -- help get simple help information cp -- help
Man command for detailed help information man cp
Info command for detailed help info cp


Linux rename to view user login information
Whoami: displays the current user name
Who am I: current user details

View system information
Uname-a: all information
Uname-s: Kernel name
Uname-n: node name
Uname-r: Release Version number
Uname-v: Kernel release time
Uname-m: hardware name
Uname-p: processor type
Uname-I: hardware platform
Uname-o: OS name

Cd command file modification, directory switch command
The cd command is similar to the doscommand in windws.
Common abbreviations:
Cd ~ : Enter the home directory
Cd.: switch to the current directory
Cd...: switch to the current directory
Cd (press enter): return to your home directory by default


Ls (list) command to list contents in the directory
Ls-l: long format. only the file size and attributes are displayed.
Ls-a: list all files, including files to be stored (note: files starting with "." are hidden files)
Ls-r: displays directory content in hierarchies
Ls -- help: Simple help for displaying ls commands
Ls -- color =? : File type display color ,"? "Indicates when to distinguish the file type by color. The following options are available:
Tty: only displayed on the terminal
Auto: default
Always: always show color
None: never displayed
On the linux rename character interface, the file types are distinguished by colors as follows:
Gray: common file

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.