1. Compress Package Management
2. Process Management
3. Network Management
4. FTP Server Setup
5. NFS Server Setup
6. SSH Server
7. SCP command
8. Other commands
9. Shutdown restart
1. Compress Package Management
1>. Dick Silk version: cannot compress directory
1). gzip--. The ZIP package in GZ format
A. gzip *.txt (compress all. txt files separately to. txt.gz, the original file will be deleted)
B. Gunzip *.gz (unzip all. GZ)
2). BZIP2--. BZ2-Format Compressed package
A. gzip *.txt (compress all. txt files separately to. txt.gz, the original file will be deleted)
B. Gzip-k *.txt (all. txt files are compressed into. txt.gz, the original files are not deleted)
C. Gunzip *.gz (unzip all. GZ)
2>. Ko Fu Handsome edition:
1). Tar--do not use the z/j parameter, this command can only package files or directories
Parameters:
C--Create--compress
X--Release--Unzip
V--Display cue message--compression decompression--can be omitted
F--Specify the name of the compressed file
Z-Compress the file using gzip--. GZ
J--Compress the file--. bz2 using the Bizp2 method
Compression:
Tar ZCVF the name of the compressed package generated (xxx.tar.gz) to compress the file or directory
Tar JCVF the name of the compressed package generated (XXX.TAR.BZ2) to compress the file or directory
Unzip:
Tar jxvf the name of the compressed package (extracted to the current directory)
Tar JXVF Compressed Package name-C Compressed Directory
2). RAR--The software must be installed manually
Parameters:
Compression: A
Decompression: X
Compression:
RAR A generates a compressed file whose name (temp) compresses the file or directory
Unzip:
RAR x Compressed file name (temp) [Unzip directory]
3). zip--
Parameters:
Compressed directory requires parameter-r
Compression:
Zip Compressed package name compressed file or directory
Unzip:
Unzip the name of the compressed package
Unzip compressed package name-D Extract Directory
Summary: The similarities:
The Tar/rar/zip parameter generates a compressed file whose name compresses the file or directory---The syntax of the compression
Tar/rar/unzip parameter Compression package name parameter (rar no parameter) extract directory--decompression syntax
2. Process Management:
1>. View current Online user status: PS aux
Filtering for the displayed process: PS aux | grep xxx
2>. View the status of the processes running inside the entire system: PS A: (all) processes for all users of the current system
PS u: View process owner and some other information
PS x: Show process without control terminal-process "input, output" that cannot interact with user
3>. To terminate a process:
1). View Signal Number: Kill-l
2). Kill process: Kill-sigkill 89899 (pid-process identification number)
4>. To view the environment variables for the current process: env
View Path:env | grep PATH
Format of the environment variable under LINXU: Key-value
Key=value:value:value:value
5>. Task Manager: Top
3. Network management:
1>. Get configuration information for a network interface: Ifconfig
2>. Test for connectivity with target host: ping [parameter-c number/-I seconds] Host name or IP address
3>. To view the IP address of the server domain name: nslookup host name (www.baidu.com)
User management:
Create User: sudo adduser + username (luffy)
sudo useradd-s/bin/bash-g itcast-d/home/itcast-m itcast
Set up user groups: sudo groupadd itcast
Delete User: sudo deluser + username (luffy)
sudo userdel-r itcast (option-r function is to remove the user's home directory together)
Switch User: Su + username (sanji)
Root User: sudo su
Set Password: sudo passwd + username (luffy)
sudo passwd root (set root password)
Log out User: Exit
Current user information for current system: VI/ECT/PASSWD
192.168.40.119
4. FTP Server Setup:--VSFTPD
Role: File Upload and download
1>. Server-side:
1). Modify the configuration file-How to modify the configuration file--vi/etc/vsftpd.conf
2). Restart the service--sudo service vsftpd restart
2>. Client:
1). Real-Name User login
FTP + IP (server)
Enter user name (server)
Enter password
Uploading and downloading of files
Uploading files: Put file
Download of files: Get file
Do not allow directory operation, if you want to manipulate directory--pack Tar/rar/zip
2). Anonymous User Login
FTP + ServerIP
User name: Anonymous
Password: Direct Enter
Do not allow anonymous users to switch directly to any directory
Works only within a specified directory scope
You need to create an anonymous user's directory on the FTP server--The root directory of the anonymous user
3). LFTP Client Access FTP server: an FTP client tool that can upload and download directories
Software Installation: sudo apt-get install lftp
Logon server: 1. LFTP Server IP return
2. Login
1. lftp [email protected] Enter
2. Enter the server password
Put upload file
Mput Uploading multiple files
Get download file
Mget Downloading multiple files
Mirror–r uploading the entire directory and its subdirectories
Mirror downloading the entire directory and its subdirectories
5. Server for NFS builds the network file system--------that allows computers in the network to share resources across TCP/IP networks.
1>. Server side: Install: sudo apt-get install Nfs-kernel-server
1). Create a shared directory
mkdir dir
2). Modify the configuration file
/etc/exports
Added:/home/itcast/share * (RO, sync)
3). Restart Service
sudo service nfs-kernel-server restart
2>. Client:
1). Mount Server shared directory
Client Access shared directory: sudo mount + IP: Shared directory name mount directory sudo mount 192.168.32.75:/home/itcast/nfsshare//mnt
6. SSH server:
1>. Server-side:
1). Installing Ssh:sudo atp-get Install Openssh-server
2>. Client:
1). telnet: SSH [email protected]
2). Log out: Logout
7. SCP command: The target host has been successfully installed Openssh-server
Super copy: Scp-r target username @ Destination Host IP address:/absolute path to the destination file/absolute (relative) path saved to native
8. Other Commands:
1>. Page SHIFT + PageUp page
Shift + PageDown-down page
2>. Clear Screen
Clear
Ctrl + L
3>. Create a terminal
Ctrl + Alt + T (Ubuntu)
Ctrl + Shift +t (Add new tab page)
4>. Read the Manual
A total of nine chapters
5> Settings View aliases: Alias LS (view aliases)
6>. Output string on the display: echo "Hello world!"
Display environment variables: Echo $PATH
Show last program exit Value: Echo $?
9. Shutdown restart
1>. Poweroff
2>. Shutdown
3>. Reboot
Linux Learning Notes-basic Operations 2