Some of the common shutdown/Restart commands in Linux are shutdown, halt, reboot, and Init, all of which can achieve the purpose of restarting the system, but the internal process of each command is different.
1.shutdownThe shutdown command shuts
。 The general format for this command is:
finger [options] [consumer] [user @ host]
The commonly used parameters of finger are as follows:
-S Displays the user's registration name, actual name, terminal name, write status, stagnation time, logon
Cat has three main functions:1. Display the entire file at once.$ cat FileName2. Create a file from the keyboard.$ cat > FileNameYou can only create new files, and you cannot edit existing files.3. Merging several files into one file.$cat file1 file2
One of the methods, modifying the file
We need Vi/proc/sys/net/ipv4/icmp_echo_ignore_all file, this folder defaults to a 0, if you need to set the ban ping, 0 to 1, so set up.
Or we write directly to the settings prohibit ping
Echo 1
DNS binding A Record #
First, a record is created on DNS, and the domain name is bound to the corresponding IP.Create a Site Directory #
On the server, add the/srv/www/vhosts/www.111cn.net directory and create a index.html file in the directory –
Last night let Yun-dimensional help me update the online a shell script, and add to the scheduled task in preparation for 12:06 A.M., when I woke up at 5 o ' clock in the morning, I always feel wrong to check the mail to see whether the scheduled
Look at the history of Linux, you can go to the user's cat/root/.bash_history view, but the lack of content, this requires SSH link will be turned off before it can be written into the history command, this matter according to Bash_ History and
First, the realization principle
SSH logon is done using a method known as "Public key" authentication. A simple explanation for the "public Key" authentication method is:
First create a pair of public private keys on the client (public key file: ~
Today in the Linux operation, to the VSFTPD service to restart, using service vsftpd restart, at this time, reported a difficult to believe the error:
Bash:service:command not found
So I went to the internet to search a bit, the solution is quite
Rsync is ideal for quickly synchronizing large, complex directories between two machines, such as the forum's attachment directory. In conjunction with SSH, the security is guaranteed, and you can use SSH public key and cron for automatic timing
Install Rsync
The code is as follows
Copy Code
wget http://rsync.samba.org/ftp/rsync/rsync-3.1.0.tar.gzEnter directory after decompression./configure–prefix=/usr/local/rsyncMakeMake installVi/etc/xinetd.d/rsync
Nginx reboot Command
The code is as follows
Copy Code
Sudo/etc/init.d/nginx Usage:/etc/init.d/nginx {Start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}
With root permissions
VI This command is often used in Linux, today we will learn how to implement a string in the VI bulk replacement.
A. Total replacement in the document:
%s#abc#def#g(Replaces all ABC in the file with Def)
For example, replace All "xwen.com" in a
Like finding a keyword in all of the PHP files underneath the current directory.
The code is as follows
Copy Code
Find./-name "*.php" | xargs grep ' keyword '
If you need to find something that contains special
The history command is primarily used to display historical instruction record content and to release instructions in the history record.1>history command syntax:[test@linux]# history [n][Test@linux]# History [-c][test@linux]# history [-raw]
Ways to modify Ip_local_port_rangeReference[Configure boot Auto start Nginx + PHP + MySQL]
The code is as follows
Copy Code
# vi/etc/rc.local
Add the following at the end:
The code is as follows
If the runlevel of the system is 0 or 6, restart the system. Otherwise, replace the shutdown command (with the-r parameter).SyntaxReboot [-n] [-w] [-d] [-f] [-I]Parameters: -N: Do not write the memory data back to the hard disk before restarting.
The tree chart uses the pid (if specified) or the basic itinerary of init as the root (root). If a user id is specified, the tree chart only displays the user's itinerary.Permission: all users.SyntaxPstree [-a] [-c] [-h |-Hpid] [-l] [-n] [-p] [-u] [-
Permission: all users.SyntaxTop [-] [d delay] [q] [c] [S] [s] [I] [n] [B]Parameter description: D: change the display update speed, or press s in the interactive command column Q: There is no delay in display speed. If the user has the
You can use the groupmod command to change the group identifier or name.SyntaxGroupmod [-g ] [-n ] [group name]Parameters: -G sets the group ID to be used. -O reuse the group ID. -N specifies the name of the group to be
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