Linux none of this can be graceful and shy of the sister said: "Open, let me come!" "(The day of Linux to take you to fly the article (beginning))

Source: Internet
Author: User

1.shutdown
Common commands:
(1) Shutdown-h 1--One minute shutdown
(2) Shutdown-h now--shutdown
(3) Shutdown-h 15:30--set at a certain time to shut down the machine
Details: Shutdown-r 2--the system starts in two minutes

2.poweroff command:
Poweroff---power off immediately
3. Halt---Suspend system
4. Reboot------Restart the system

5.***---init command----* * *
init [0-Stop, 1-single-user mode, 2-multiuser mode]
[3-Full multiuser mode, 4-unallocated use, 5-graphical interface, 6-reboot]
When we forget the root command, we switch the system to single-user mode,
Then reset the root user password.

6. Find a software that we have installed.
Rpm-aq | grep gcc--check if we have the GCC software installed
Rpm-aq--List all installed software
Add a channel to further constrain the query condition.

7. For a small problem:
How to save a content, edit to a file.
For example Netstate-an >>gxjun.txt use >> for append and use > for overlay

8. For the < and << of the two operations, there is a similar difference between the same,

9. Usage of CD:
(1): Cd/home---absolute path
(2): CD. /etc---relative paths

10: ~ Represents the home directory of the current user, so
[[Email protected] etc]# CD ~--Home Directory
One. LS--View file List command
PWD View your current directory
A. Touch creates an empty file
Touch [option/path] filename
Touch Gxjun--Create a file named Gxjun.
-----------------------Modify the timestamp-----------------------------
sh-4.1# touch-d "10/12/10 21:20" Gxjun
sh-4.1# ls-l Gxjun
-rw-r--r--. 1 root root 0 Oct Gxjun

mkdir---Create a directory
MV Res Dec---move a file
15. view file type filename
sh-4.1# file Gxjun
Gxjun:empty
16: When we want to see the content of a file, there are generally two ways.
Method One: VI gxijun.txt use VI to open, and then view.
Method Two: The cat gxjun.txt is displayed directly on the black and white panel.
The role of the tail command is to start viewing the text from the last line of text.

[[email protected] ~]# TAIL-2 Gxjun.txt---View the contents of the last two lines of Gxjun.txt
UNIX 3 [] Dgram 9115
UNIX 3 [] Dgram 9114

More commands are often used to view long files.
[Email protected] ~]# more Gxjun.txt
At the same time: less

WC--Text Statistics command "Number of lines, number of words, bytes, and filename"
20. Some basic commands about time
(1). [[Email protected] ~]# date + "%F%T"
2015-03-15 10:49:09
(2). [[email protected] ~]# cal
March 2015
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
(3).
Note: The CAL command looks at the specified year or month, such as viewing the February 2009 calendar
[[email protected] ~]# Cal 2 2009
February 2009
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
21. It is important to note that:
Linux has two clocks, and the first clock is the system's own system. The second type is hardware system.
22.who---View users in the current system
[email protected] ~]# who
Root Tty1 2015-03-06 09:25
Root pts/0 2015-03-15 10:26 (192.168.0.112)
Finger--command to view users logged into the system and related information,
A. W---see who is using the system.
[Email protected] ~]# W
10:59:19 up 9 days, Min, 2 users, Load average:0.00, 0.00, 0.00
USER TTY from [email protected] IDLE jcpu PCPU
Root tty1-06mar15 12:57m 0.13s 0.03s Bash
Root pts/0 192.168.0.112 10:26 0.00s 0.24s 0.04s W
Wall---Send announcements to all online users.

[Email protected] ~]# Wall Hello world!!
Wall Hello Worldclear

Broadcast message from [email protected] (pts/0) (Sun Mar 15 11:02:09 2015):

Hello Worldclear
The. Write---Send messages to other users, including root. "CTRL + c---Exit even if message mode"
MESG [n/y]---The command is to reject the message or accept the message.
Fuser--Disconnecting user commands Fuser

Linux none of this can be graceful and shy of the sister said: "Open, let me come!" "(The day of Linux to take you to fly the article (beginning))

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.