Linux Basic Command One

Source: Internet
Author: User

Linux Primary Knowledge:
Basic command:
Increase

Install software: Yum install Lrzsz (easy to drag and drop Linux and Windows files)
Unzip file: TAR-ZXVF python-3.6.5_\ (1\). tgz
Install the underlying compilation tool (for compiling and installing Python): Yum install gcc zlib*-y
To compile the installation process:
./configure--prefix=/opt/python3.6
Make && make install


By deleting
Delete Files: RM heiheihei.txt
Force recursive Delete Delete: RM-RF
Rm-f: Force Delete



Change
Copy file: CP heihei.txt Heiheihei.txt

Moving files: MV Heihei.txt zhaoyun_home

Check
View Host Name: hostname
View IP address: IP addr
Xshell connection server: SSH 192.168.11.93 (server IP address)
#查看当前所在目录: pwd
View directories and files: LS
Create folder: mkdir Zhaoyun
Create normal file (white) Touch zhaoyun.py
Add normal User: Useradd Zhaoyun
change user password: passwd zhaoyun
View file information: cat/etc/passwd
Cat >> file name << EOF (enter edit mode) ... After editing is complete = = "EOF

Switch Linux users: Su-zhaoyun
See who the current user is: WhoAmI
View all files vertically, folder: Ls-la
Edit file: vim/etc/sysconfig/network-scripts/ifcfg-eno16777736
How Vim is used (
Vim filename Open File
Press I to enter edit mode, write String = = "I:insert meaning"
After writing, press ESC, enter command mode, enter: wq! Save exit,: x! Same effect: q! Force quit, do not save

Less file name: and opens and displays the contents of the file,

DD deletes the cursor in the row
G Enter the first line of the file
G go to the bottom of the file
o Insert a string in the row of the cursor, the next line

· Q Exit File View

More filename: Similar to less view the command for the contents of a file



Edit environment variable file: Vim/etc/profile, write to export $PATH at the bottom:/opt/python3.6/bin
Make the environment variable effective: source/etc/profile

Empty current terminal useless information: clear

Run the first Python file:./python3 first.py

View current system environment variables: Echo $PATH
echo "... ": Display content to terminal = = =" equals: Input (), Console.log ()
echo "... ">> file name = =" Append Write
echo "... "> FileName = =" empty Write = = = "equals" W "mode
Clear: Clear screen = = "Equals Ctrl +l
Tree: Displays the current file structure as a graph

Linux Basic Command One

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.