Linux commands use the format

Source: Internet
Author: User

Linux Commands format :
command [options] [arguments]
Command: Commands
Options:--words or-word
such as: LS--all
Equ ls-a
Ls-a-b-c
Equ LS-ABC
Argument: parameter (file name or other)



Detailed introduction to Ifconfig,echo, TTY, STARTX, export, pwd, history, shutdown, Poweroff, reboot, Hwclock, date

Ifconfig

Ifconfig is the command for displaying or configuring network devices in Linux, full name (network interfaces Configuring).


For:ifconfig Display Network card information

[[Email protected] ~]#ifconfig
Eth0 Link encap:ethernet HWaddr 00:50:56:bf:26:20
inet addr:192.168.120.204 bcast:192.168.120.255 mask:255.255.255.0
Up broadcast RUNNING multicast mtu:1500 metric:1
RX packets:8700857 errors:0 dropped:0 overruns:0 frame:0
TX packets:31533 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:596390239 (568.7 MiB) TX bytes:2886956 (2.7 MiB)

Lo Link encap:local Loopback
inet addr:127.0.0.1 mask:255.0.0.0
Up LOOPBACK RUNNING mtu:16436 metric:1
RX packets:68 errors:0 dropped:0 overruns:0 frame:0
TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2856 (2.7 KiB) TX bytes:2856 (2.7 KiB)


For: start off the specified Nic

ifconfig eth0 up

Ifconfig eth0 Down


For: Configure the IP address of the network card

Ifconfig eth0 192.168.0.1 netmask 255.255.255.0


Echo:

Function: Display a piece of text on the display, generally play the role of a hint.

Syntax: Echo [-ne][string] or echo [--help][--version]

Additional note: Echo will send the input string to standard output. The output strings are separated by white space characters, and a newline number is added at the end.
Parameter:-n do not wrap in the last line
-E If the following characters appear in the string, they are handled in particular, not as a general
Text output:
\a issued a warning sound;
\b Delete the previous character;
\c finally not add the line break symbol;
\f the line but the cursor remains in its original position;
\ n Wraps and the cursor moves to the beginning of the line;
\ r The cursor moves to the beginning of the line, but does not wrap;
\ t Insert tab;
\v is the same as \f;
\ \ insert \ character;
\NNN inserts the ASCII character represented by the NNN (octal);
Help Display Help
–version displaying version information


TTY: The general designation of terminal equipment

View the current standard terminal file description symbol

[[email protected] etc]$ TTY
/dev/pts/6

After the TTY is entered, the output "/DEV/PTS/6" is the file description symbol for the currently connected terminal.


StartX: Used to start x Windows, start graphical


Export:

Variable assignment: Export NAME=ZHAOM

View environment variables


PWD: Displays the current working directory


History: Used to show commands that have been executed, or to follow the options to execute the commands you need


-C: Empty command

History #: Show the most recent # command

-r: Read command from file to elapsed list
-W: The commands in the elapsed list are appended to the duration file
Invoke commands from the command-duration list
!#: Once again execute the # command in the elapsed list
!! : Executes the previous command again
!sudo: One more time to execute command last command with Sudo beginning


Shutdown: Shut down the machine


Poweroff: Shutdown command
Command parameters:
-F: Force shutdown, do not call shutdown
-P: Power down, silent parameters
-W: only displays the shutdown warning, does not invoke the shutdown command, and the record is written to/var/log/wtmp


Reboot: Rebooting the system


Hwclock: View or set hardware time


Date: View or modify the current system time

System Modification Time Date 091700572016
Hwclock-s-history: Adjust the system time to hardware time




Linux commands use the format

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.