Linux Basic Instruction Learning

Source: Internet
Author: User
Tags create directory file upload gz file

1. Enter the catalogue cd/home/mmkj
Return to the previous level CD.
Return root directory CD/
Create directory: mkdir XMYFSJ (create XMYFSJ folder)
Delete directory: RmDir XMYFSJ
Delete folder: Rm-rf XMYFSJ
Display file type: filename
Create an empty file: Touch aa.txt
Copy file: CP aa.txt Bb.txt
Renaming files: MV Aa.txt bb.txt
View current directory: PWD
/root/sj/node

Create two-tier folders under the root directory mkdir-p/data/db

2. Move the file (move the/home/mmkj directory under Aa.txt to/HOME/XMYFSJ)
Mv/home/mmkj/aa.txt/home/xmyfsj

MV Unzip/*.png. Move all pictures under unzip with the suffix PNG to the Unzip sibling directory

Move files and rename
Mv/mnt/disk/pgm.mp4/mnt/nginx/html/2018/04/02/test.mp4

3. Delete a directory or file----------------------------------------------------------------------------------------------------------------- ----------------------------------------------/+
RM-RF folder name or file name

4. File Upload and download
You need to install the upload download package first or you cannot use the upload download command # yum-y Install Lrzsz
Uploaded: # RZ
Download: # SZ Aa.txt
# wget HTTPS://NODEJS.ORG/DIST/V4.4.4/NODE-V4.4.4-LINUX-X64.TAR.XZ
TAR-XVF MONGODB-LINUX-X86_64-2.6.7.TAR.XZ

5. Decompression (Specify folder dirname) installation
. tar.gz file
Decompression: TAR-ZXVF nginx-1.13.1.tar.gz
TAR-ZXVF mongodb-linux-x86_64-2.6.7.tgz
TAR-XVF MONGODB-LINUX-X86_64-2.6.7.TAR.XZ

Compression: TAR-ZCVF nginx-1.13.1.tar.gz DirName

Install unzip command: Yum install zip unzip
. zip file
Decompression: Unzip Nginx-1.13.1.zip
Compression: Zip Nginx-1.13.1.tar.gz.zip DirName

. rpm File
RPM-IVH jdk-8u131-linux-x64.rpm

Compressed folder
Zip-q-R srs.zip/root/sj/srs/(compresses files in/root/sj/srs/directory to srs.zip)

6. Start Tomact and stop Tomcat run
Cd/home/mmkj
TAR-ZXVF apache-tomcat-7.0.53.tar.gz
cd/home/mmkj/apache-tomcat-7.0.53 (Enter the Tomcat installation directory)
Start: bin/startup.sh
Off: bin/shutdown.sh (sometimes may be due to insufficient permissions to switch to root user su root)

7. Install MySQL
1.sudo Apt-get Install Mysql-server
2.sudo Apt-get Install Mysql-client
3.sudo Apt-get Install Libmysqlclient-dev
Installing the MySQL Visual interface (MySQL Workbench)
sudo apt-get install Mysql-workbench


Check if MySQL database service is set to boot itself?
Execute command: chkconfig--list | grep mysqld
Chkconfig mysqld on sets the MySQL database service to boot automatically.

Mysqladmin-u root password ' root '

The 8.Linux system offers a wide variety of commands. You can implement many functions by entering these commands in the shell.
I am here to introduce some commands to help you understand your Raspberry Pi. First use the LSCPU command to query the CPU information:
Input LSCPU

The terminal window prints out the CPU information:
architecture:armv7l
Byte Order:little Endian
CPU (s): 4
On-line CPU (s) list:0-3
Thread (s) per core:1
Core (s) per Socket:4
Socket (s): 1
Model Name:armv7 Processor Rev 4 (V7L)
CPU Max mhz:1200.0000
CPU min mhz:600.0000
As you can see, my Raspberry Pi is a 4-core ARM processor with a maximum frequency of up to 1200MHz.
More references can be http://www.cnblogs.com/vamei/p/6224295.html

The 9:vi editor is the most powerful text editor used under Linux,
VI has three modes: Command mode, edit mode, and last-line mode, when you initially use VI to open a file,
In command mode, the use of commands I, I, A, A, O, O can be entered in the editing mode,
And to put it back in command mode, you just need to tap ESC in edit mode.
If there's anything you don't understand, you can look at the fourth chapter of "Linux should learn"
The use of VI (M) editor and advanced techniques are described in detail.

Linux Basic Instruction Learning

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.