Linux Basics and Common commands

Source: Internet
Author: User

frequently used commands:
#View Port usageNetstat-tunlp|grep 22#View Java ProcessesPs-ef|grep java#compression front-end engineeringRAR a-ep1./update/win32.zip./packages/**/win32/*#Find all files and folders with wineFind/-name *wine*#files that overload environment variablessource/etc/ Profile#View memory image information for a processPmap-d 1#See the 10 most memory-intensive processesPs-aux | Sort-k4nr | Head-10#Modify Directory Permissionssudo chown-r docker/usr/Local#get web page informationCurl www.baidu.com Linux#Modify Directory Permissionschmod 777/home/user
Linux Basic directory:Directory storage file, file storage data bin: Storage of 2 of files, all users can use Sbin: Store only the root user can use the command boot: stored the system's boot file, 200m--300mdev:ram quite with the memory SDA first hard disk SDA1 partition etc: storage of various system files (equivalent to Windows in Windows C) Home: The user information and information for ordinary users, 1024Mroot: The user profile and information for the root user media: Storage folder for some external devices TMP: Data currently running on the system (memory) USR: Some applications installed by ordinary users VAR: some services running on the current system SELinux: similar to firewalls , storing various log files Study notes:Bring up the command line: under app; right-click #root permissions Date view time Cal view month calendar cal 1 2013 cd/switch to root directory  CD root followed by clear path PWD Displays the current location CD. Represents a previous-level menu CD. Refresh current directory CD-return CD-Direct return + catalog LS View the contents of the current directory ls  -a view the current directory contains hidden files a bit ls-l view the current file's used properties cat view the contents of the file  cat-- Help current directory contains TAC files from the bottom of the Web show head by default only see the contents of the first 10 lines of the file tail default only see the last 10 lines of the file cat  >  test   End edit Ctrl+dcat Test > Test2 Overwrite the contents of the test file to Test2cat Test test2 > Test3 Merge the Test and test2 into the test3 CP copy CP test3/write the item to be copied, where the write is copied to Mv/test3  /root/de sktop/Cut to desktop RM Delete   to write full lowercase yes permanently delete, no touch in Recycle Bin: After creation, you cannot edit the file mkdir create an empty directory    View the Cpu:lscpuls command in detail: the first byte: [-] Represents a file, [d] represents a directory, [L] represents a linked file, [b] represents a storage-ready pretext device in the appliance file, [C] Represents the middle 9 bytes of the serial port device in the appliance file: The first 3 bytes: The right of the creator 3 bytes: The permissions of the group last 3 bytes: Other user rights Su-plus user name: You can switch to another user for the execution of a directory to indicate whether access to the directory   create users Useradd Redhat (username) Delete user Userdel redhat [1] Set this boot to single user mode passwd change password init 5 back to graphical interface vim/boot/grub/grub.conf  Grub-md5-crypt vim Editor yy P fast copy y4y p copy 4 lines u cancel the previous Operation  shift+; The cursor moves to the lower   bottom row mode set NU Displays the line number of each line 16+enter jumps to 16 lines I means insert a at the current position the next character inserted in the current positiono Another line in edit         command line mode        |shift+;|    Bottom line       &NBS P;a I o                |                Edit Mode back to the bottom row mode Wq save exit  chattr +a grub.conf Add a to file hidden properties  chattr-a               Hide attributes Remove chattr +i               READ-only chown   (username) (file name)   Modify file owner Chgrp   &NBSP ;                     Modify group chmod   O+w Hello to other add writable properties   &NBSP ; U: Users     g: Group O: Other users chmod   762 Hello        RWX 421 each other     

Linux basics and Common 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.