Basic Linux knowledge

Source: Internet
Author: User
Tips for Linux: Press the tab key when you enter the su password. when you change the su password to the root user, the system will prompt you to enter the password, if the password is forgotten, you can use $: sudopasswd to set the password. 2. the file directory in llinux & quot;: root: Linux preliminary knowledge tips: you can press the tab key to automatically add the following 1. when you change the su password and switch to the root user using su, you will be prompted to enter the password. if the password is forgotten, you can use $: sudo passwd: Set the password. 2. directory of files in llinux: "/": root: stores files related to the root user. home: stores files related to common users. bin: directory for storing frequently-used commands sbin: Command with permissions mnt: default directory for mounting optical drives and soft drives boot: Directory for storing boot-related files etc: Configuration-related files (configuration of various environments) var: store frequently changing data usr: the default folder for installing software (similar to the program under win) dev: Interface Device file directory. for example, had indicates hard disk proc: currently, system core and program execution information 3: linux running Level 0: Shutdown (this cannot enter the system) 1: Single User 2: Multi-user status no network service 3: multi-user status with network services (usually set to this) 4: The system uses the 5: graphic interface reserved for users (the graphic interface is displayed when the machine is started) 6, the common levels of system restart are 3 and 5. to modify the default running level, you can change the id of the file/etc/inittab to 5: initdefault: data in this line 4, common Command -- help can view related operation man command can view the relevant documentation pwd: display the current directory cd: switch directory ls: list files and directories (The following are the parameters used for this command) (For more information, see ls -- help) ls-a show hidden file ls-l show long list file (you can see the size and date) dir: It is also a list file (but the font has no color) mkdir: Create directory rmdir: delete the empty directory touch: create an empty file cp: Copy command (for example, cp hello hello2 is to copy the file hello to the folder hello2) cp-r dir1 dir2mv: move the file and change the file name (mv hello hello2 moves the hello file to the hello2 directory) rm: delete the file box directory rm-rf delete all content more: Show the file content, with paging less: show the file content grep: query the content in the text (grep "find_name" wenjian) (grep "find_name" wenjian> the data retrieved by test is written to the file "test, here> overwrite> append write) l: Pipeline command (submit the result of the previous command to the command after pipeline l for processing) find search file and directory (find hello file) find/-name hello (meaning search for a hello file under the same directory) user management (must switch to root) add user useradd name set password passwd name
Related Article

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.