Linux basic and common commands, Linux basic common commands

Source: Internet
Author: User

Linux basic and common commands, Linux basic common commands
Frequently Used commands:

# View port usage netstat-tunlp | grep 22 # view java Process ps-ef | grep java # compress front-end project rar a-ep1. /update/win32.zip. /packages/**/win32/* # find all files with wine and folders find/-name * wine * # reload the environment variable file source/etc/profile # view the process memory Image Information pmap-d 1 # view the top 10 processes with the most memory usage ps-aux | sort-k4nr | head-10 # modify directory permissions sudo chown-R docker/usr/local # obtain webpage information curl www.baidu.com Linux # modify directory permission chmod 777/home/user
  Linux basic directory:Directory stores files and files store data bin: stores binary files, and all users can use sbin: stores the boot command that only root users can use: stores the System Startup File, 200 m -- 300 Mdev: ram is equivalent to the first sda1 partition in the memory sda. etc: It stores various system files (equivalent to Windows on drive C in Windows) home: stores user information and information of common users. 1024 Mroot: stores user information and information of root users. media: stores external device folders. tmp: information (memory) running on the current system usr: Some application programs installed by common users var: Some services running on the current system seLinux: similar to firewalls, storing various log files Study Notes:Call up command line: application; right-click the mouse # root permission date view time cal view calendar cal 1 2013 cd/switch to the root directory cd root followed by a clear path pwd show the current location cd .. indicates the upper-level menu cd. refresh the current directory cd-return cd-directly return + directory ls view the content contained in the current directory ls-a view the hidden files contained in the current directory a bit ahead of ls-l view the properties used by the current file cat View File Content cat -- help the tac file contained in the current directory displays the head from the Internet. By default, only the contents of the first 10 lines of the file are viewed. By default, only the last 10 lines of the file are viewed. cat> test end editing CTRL + Dcat test> test2 overwrite the content of the test file to test2cat test test2> test3 merge test and test2 to test3 cp copy cp test3/write the project to be copied first, in the write copy location mv/test3/root/desktop/cut to the desktop rm Delete to write the complete lowercase yes permanently delete, the recycle bin does not use touch: After the creation, you cannot edit the file mkdir to create an empty directory. The CPU: lscpuls command details: the first byte: [-] indicates the file, [d] indicates the directory, and [l] indicates the link file, [B] indicates an excuse device in the device file for storage. [c] indicates 9 bytes in the middle of the serial port device in the device file: the first 3 bytes: the Creator's permission consists of three Bytes: Group permission, and the last three Bytes: other user permissions, su-plus User Name: you can switch to another user's execution permission for a directory to indicate whether the user useradd redhat (User Name) can be created in this directory) delete user userdel redhat [1] and set this startup to single-user mode passwd Change Password init 5 to return to the graphical interface vim/boot/grub. conf grub-md5-crypt vim editor yy p quick copy y4y p copy 4 lines u cancel the previous operation shift +; cursor moves to the bottom row mode set nu displays the row number of each line 16 + enter jump to 16 lines I indicates to insert a in the current position the next character in the current position insert o another line in the edit command row mode | shift +; | baseline Mode a I o | edit mode back to baseline mode wq save and exit chattr + a grub. conf adds the hidden attribute of a to the file. chattr-a removes the hidden attribute of a from chattr + I read-only chown (User Name) (file name) modify file owner chgrp modify group chmod o + w hello add writable attribute u: User g: group o: other users chmod 762 hello rwx 421 correspond to each other

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.