第5章 首次登录与在线求助man page

首次登录系统

  centos默认图像界面为GNOME。

  Linux默认情况下会提供6个Terminal来让用户登录,切换方式为ctrl+alt+[F1-F6],系统将这六个操作界面命名为tty1-tty6。

  在终端界面想启动窗口界面的话,可以使用‘startx’命令。

在命令行模式下执行命令

开始执行命令

    命令格式:command [-options] parameter1 parameter2 ...

基础命令的操作

    显示日期和时间:date

    显示日历:cal

    显示计算器:bc

重要的热键

    Tab键

具有命令补全和文件补齐功能。

命令补全:比如输入:ca [tab] [tab] ,将会把所有以ca开头的指令显示出来,如下;      

[root@localhost ~]# ca [tab] [tab]
cacertdir_rehash     ca-legacy            captoinfo
cache_check          calibrate_ppa        caribou-preferences
cache_dump           caller               case
cache_metadata_size  canberra-boot        cat
cache_repair         canberra-gtk-play    catchsegv
cache_restore        cancel               catman
cairo-sphinx         cancel.cups          
cal                  capsh                
[root@localhost ~]# ca

文件补齐:比如输入:ls -al ~/.bash [tab] [tab],如下:

[root@localhost ~]# ls -al ~/.bash [tab] [tab]
.bash_history  .bash_logout   .bash_profile  .bashrc        
[root@localhost ~]# ls -al ~/.bash

    Ctrl+c按键

      停止当前程序。

在线求助man page和info page

man page

输入:man date,显示如下:   

DATE(1)                          User Commands                         DATE(1)

NAME
       date - print or set the system date and time

SYNOPSIS
       date [OPTION]... [+FORMAT]
       date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]

DESCRIPTION
       Display the current time in the given FORMAT, or set the system date.

       Mandatory  arguments  to  long  options are mandatory for short options
       too.

       -d, --date=STRING
              display time described by STRING, not 'now'

       -f, --file=DATEFILE
              like --date once for each line of DATEFILE

       -I[TIMESPEC], --iso-8601[=TIMESPEC]
              output date/time in ISO 8601 format.  TIMESPEC='date'  for  date
......后面省略

    DATE(1)中的1代表一般用户可使用的命令。常用的几个数字如下:

      1:用户在shell环境下可以操作的命令或可执行文件

      5:配置文件或者某些文件的格式

      8:系统管理员可用的管理命令

    进入命令信息页面后,可以通过以下按键进行一些操作:

      空格:下翻一页

      page down:下翻一页

      page up:上翻一页

      home:回到第一页

      end:回到最后一页

      /string:向下查找string

      ?string:向上查找string

      n,N:使用以上两个查找字符串指令时,可以使用n来继续下一个查询,N来继续上一个查询。

      q:结束这次的man page

info page

    与man指令用途差不多,显示方式不同。

正确的关机方法

关机前可以先查看计算机状态

  who:查看目前在线用户

  netstat -a:网络的联机状态

  ps -aux:查看后台执行的程序

通知用户关机时刻

    shutdown命令

数据同步写入磁盘:sync

    为了加快数据读取,很多数据被放在内存中,关机前应同步到磁盘中,可执行sync指令。shutdown/reboot/halt指令在关机前都会执行sync的调用。

  惯用的关机命令:shutdown

  重启、关机:reboot,halt,poweroff

切换执行等级:init

    0:关机

    3:纯命令行模式

    5:含有图形界面模式

    6:重启

    

1 d数字dddddd
   
   
   
   
   
   
   
   
原文地址:https://www.cnblogs.com/wuchaodzxx/p/5619701.html