Linux系统上命令的使用格式

详细介绍ifconfig、echo、tty、startx、export、pwd、history、shutdown、poweroff、reboot、hwclock、

ifconfig

  • ifconfig [-a] [-v] [-s] <interface> [[<AF>] <address>]
    [add <address>[/<prefixlen>]]
    [del <address>[/<prefixlen>]]
    [netmask <address>] [dstaddr <address>] [tunnel <address>]
    [[-]dynamic]
    [up|down] …

echo

  • Output the ARGs
  • \a alert (bell)
    \b backspace
    \c suppress trailing newline
    \E escape character
    \f form feed
    \n new line
    \r carriage return
    \t horizontal tab
    \v vertical tab

tty

  • Print the file name of the terminal connected to standard input.
  • -s, –silent, –quiet
    print nothing, only return an exit status
  • –help display this help and exit
  • –version
    output version information and exit

startx

  • 启动图形化桌面

export

  • export [-nf] [name[=value] …] or export -p

pwd

  • Print the current working directory.
  • With the -P option, pwd prints
    the physical directory, without any symbolic links;
  • the -L option
    makes pwd follow symbolic links.

history

history [-c] [-d offset]

[-n] or history -awrn [filename] or history -ps arg [arg…]

shutdown

  • -h now +时间 ,14:20
  • –no-wall

poweroff

  • -n Don’t sync before reboot or halt. Note that the kernel and storage drivers may still sync.
  • -w Don’t actually reboot or halt but only write the wtmp record (in the /var/log/wtmp file).
  • -d Don’t write the wtmp record. The -n flag implies -d.
  • -f Force halt or reboot, don’t call shutdown(8).
  • -i Shut down all network interfaces just before halt or reboot.
  • -h Put all harddrives on the system in standby mode just before halt or poweroff.

reboot

  • -n Don’t sync before reboot or halt. Note that the kernel and storage drivers may still sync.
  • -w Don’t actually reboot or halt but only write the wtmp record (in the /var/log/wtmp file).
  • -d Don’t write the wtmp record. The -n flag implies -d.
  • -f Force halt or reboot, don’t call shutdown(8).
  • -i Shut down all network interfaces just before halt or reboot.
  • -h Put all harddrives on the system in standby mode just before halt or poweroff.

hwclock

  • hwclock – query and set the hardware clock (RTC) hwclock -r or hwclock –show
    hwclock -w or hwclock –systohc
    hwclock -s or hwclock –hctosys
    hwclock -a or hwclock –adjust
    hwclock -v or hwclock –version
    hwclock –set –date=newdate
    hwclock –getepoch
    hwclock –setepoch –epoch=year
  • date
  • date [OPTION]… [+FORMAT]
    date [-u|–utc|–universal] [MMDDhhmm[[CC]YY][.ss]]

本文来自投稿,不代表Linux运维部落立场,如若转载,请注明出处:http://www.178linux.com/98137

联系我们

400-080-6560

在线咨询

工作时间:周一至周五,9:30-18:30,节假日同时也值班

QR code