马哥教育网络班22期+第1周课程练习

1、描述计算机的组成及其功能。

    计算机由五大功能部分组成(冯诺依曼体系):运算器、控制器、储存器、输入设备、输出设备,对应到具体的硬件设备如下:

    CPU    :    包含运算器、控制器、寄存器及缓存

        功能:以时间流逝的方式来提供计算能力

    内存    :    存储器

        功能:程序(指令+数据)运行时需加载到内存中,以便CPU寻址访问

    键盘鼠标    :输入设备

        功能:与计算机交互的入口,用来提供命令,数据等

    显示器    :    输出设备

        功能:反馈计算机运算处理的结果

2、按系统罗列Linux的发行版,并描述不同发行版之间的联系与区别。

    Linux发行版三大分支:

    1、Debian (以社区方式运作)

        子分支:ubuntu

            子分支:mint

            knopix

    2、Slackware (以商业公司运作)

        子分支:S.u.S.E

            子分支:SLES

                 OpenSUSE

    2、RedHat (以商业公司运作)

        RedHat Enterprise Linux(RHEL)

            子分支:CentOS (Community Enterprise OS)

        Fedora

    其他有代表性的发行版:Gentoo、ArchLinux等。

3、描述Linux的哲学思想,并按照自己的理解对其进行解释性描述。

    Linux的重要哲学思想之一:一切皆文件,Linux上的一切都可以抽象为文件,包括设备,驱动等;

4、说明Linux系统上命令的使用格式;详细介绍ifconfig、echo、tty、startx、export、pwd、history、shutdown、poweroff、reboot、hwclock、date命令的使用,并配合相应的示例来阐述。

    Linux命令的使用格式:命令 选项 参数

                命令:将某个二进制文件运行起来(进程)

                选项:指定命令的运行特性

                参数:命令的作用对象

    ifconfig:显示系统网络设备的配置信息

    echo:将内容回显到标准输出上

[root@T01-7-2-1511 ~]# echo "Test"
Test
[root@T01-7-2-1511 ~]#

    tty:显示连接到标准输入的终端名

[root@T01-7-2-1511 ~]# tty
/dev/pts/0
[root@T01-7-2-1511 ~]#

    startx:在CLI中启动GUI界面的命令

    export:unknow

    pwd:显示用户的工作目录(当前目录)

[root@T01-7-2-1511 test]# pwd
/tmp/test
[root@T01-7-2-1511 test]#

    history:显示命令的历史纪录

[root@T01-7-2-1511 test]# history
    1  ls
    2  pwd
    3  exit
    4  date
......
  307  tree /tmp/magedu.com
  308  ls -d /etc/[^[:alpha:]][a-z]*
  309  ls -d /etc/[0-9]*[^0-9]
  310  ls -d /var/l?[[:lower:]]
  311  logout
  312  ifconfig
  313  man ifconfig
  314  man echo
  315  echo "Test"
  316  man tty
  317  tty
  318  cd /tmp/test/
  319  pwd
  320  history
[root@T01-7-2-1511 test]#

    shutdown、poweroff、reboot:系统关机重启的命令(管理类命令,需管理员权限)

    hwclock:显示、设定系统的硬件时间

[root@T01-7-2-1511 test]# hwclock
Mon 15 Aug 2016 10:08:33 AM CST  -0.145705 seconds
[root@T01-7-2-1511 test]#

    date:显示、设定系统时间及日期

[root@T01-7-2-1511 test]# date
Mon Aug 15 10:02:15 CST 2016
[root@T01-7-2-1511 test]#

5、如何在Linux系统上获取命令的帮助信息,请详细列出,并描述man文档的章节是如何划分的。

    对于BASH内建的命令:help 命令

[root@T01-7-2-1511 test]# help cd
cd: cd [-L|[-P [-e]]] [dir]
    Change the shell working directory.
    
    Change the current directory to DIR.  The default DIR is the value of the
    HOME shell variable.
    
    The variable CDPATH defines the search path for the directory containing
    DIR.  Alternative directory names in CDPATH are separated by a colon (:).
    A null directory name is the same as the current directory.  If DIR begins
    with a slash (/), then CDPATH is not used.
    
    If the directory is not found, and the shell option `cdable_vars' is set,
    the word is assumed to be  a variable name.  If that variable has a value,
    its value is used for DIR.
    
    Options:
        -L      force symbolic links to be followed
        -P      use the physical directory structure without following symbolic
        links
...
[root@T01-7-2-1511 test]#

    对于外部命令:1、命令 –help

[root@T01-7-2-1511 test]# ls --help
Usage: ls [OPTION]... [FILE]...
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.

Mandatory arguments to long options are mandatory for short options too.
  -a, --all                  do not ignore entries starting with .
  -A, --almost-all           do not list implied . and ..
      --author               with -l, print the author of each file
  -b, --escape               print C-style escapes for nongraphic characters
      --block-size=SIZE      scale sizes by SIZE before printing them; e.g.,
                               '--block-size=M' prints sizes in units of
                               1,048,576 bytes; see SIZE format below
  -B, --ignore-backups       do not list implied entries ending with ~
  -c                         with -lt: sort by, and show, ctime (time of last
                               modification of file status information);
                               with -l: show ctime and sort by name;
                               otherwise: sort by ctime, newest first
...
[root@T01-7-2-1511 test]#

            2、man 命令

[root@T01-7-2-1511 test]# man echo
ECHO(1)                                                                                         User Commands                                                                                        ECHO(1)

NAME
       echo - display a line of text

SYNOPSIS
       echo [SHORT-OPTION]... [STRING]...
       echo LONG-OPTION

DESCRIPTION
       Echo the STRING(s) to standard output.

       -n     do not output the trailing newline

       -e     enable interpretation of backslash escapes

       -E     disable interpretation of backslash escapes (default)

       --help display this help and exit

       --version
              output version information and exit

       If -e is in effect, the following sequences are recognized:

       \\     backslash

       \a     alert (BEL)

       \b     backspace

       \c     produce no further output

       \e     escape

       \f     form feed

       \n     new line

       \r     carriage return

       \t     horizontal tab

       \v     vertical tab

       \0NNN  byte with octal value NNN (1 to 3 digits)

       \xHH   byte with hexadecimal value HH (1 to 2 digits)

       NOTE: your shell may have its own version of echo, which usually supersedes the version described here.  Please refer to your shell's documentation for details about the options it supports.

       GNU coreutils online help: <http://www.gnu.org/software/coreutils/> Report echo translation bugs to <http://translationproject.org/team/>

AUTHOR
       Written by Brian Fox and Chet Ramey.

COPYRIGHT
       Copyright Â© 2013 Free Software Foundation, Inc.  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
       This is free software: you are free to change and redistribute it.  There is NO WARRANTY, to the extent permitted by law.

SEE ALSO
       The full documentation for echo is maintained as a Texinfo manual.  If the info and echo programs are properly installed at your site, the command

              info coreutils 'echo invocation'

       should give you access to the complete manual.

GNU coreutils 8.22                                                                              November 2015                                                                                        ECHO(1)
[root@T01-7-2-1511 test]#

    man手册章节划分:

        1:用户命令

        2:系统调用

        3:库用户

        4:特殊文件(如设备文件)

        5:文件格式(如etc/下的配置文件的语法)

        6:游戏

        7:杂项

        8: 管理命令

6、请罗列Linux发行版的基础目录名称法则及公用规定

    

    参照FHS的规定如下:

    /boot: 系统启动相关的文件

    /dev: 设备文件

        设备文件:

        块设备:随机访问,数据块

        字符设备:线性访问,按字符为单位

        设备号:主设备号(major)和次设备号(minor)

    /etc:配置文件

    /home:用户的家目录,每一个用户的家目录通常默认为/home下,目录与用户名相同

    /root:管理员的家目录;

    /lib:库文件

        静态库,  .a

        动态库, .dll, .so (shared object)

        /lib/modules:内核模块文件

    /media:挂载点目录,移动设备

    /mnt:挂载点目录,额外的临时文件系统

    /opt:可选目录,第三方程序的安装目录

    /proc:伪文件系统,内核映射文件

    /sys:伪文件系统,跟硬件设备相关的属性映射文件

    /tmp:临时文件, /var/tmp

    /var:可变化的文件

    /bin: 可执行文件, 用户命令

    /sbin:管理命令

    /usr:shared, read-only

        /usr/bin

        /usr/sbin

        /usr/lib

        /usr/local:

            /usr/local/bin

            /usr/local/sbin

            /usr/local/lib

   

原创文章,作者:N22-无锡-秋林箭,如若转载,请注明出处:http://www.178linux.com/34601

(0)
N22-无锡-秋林箭N22-无锡-秋林箭
上一篇 2016-08-15
下一篇 2016-08-15

相关推荐

  • shell脚本一键安装二进制Apache

    安装背景:用的一台最小化安装的centos6。 编译安装安装的必备安装gcc,gcc-c++ 安装包arp,arp-util以及pcre的压缩包已经传到七牛,没有通过官网下载。太慢。 apache是通过官网下载的,所以下载比较慢,需要的话更改下地址 不足,只按照正常流程写,未做任何异常判断处理 #/bin/bash #一键安装Apache #安装GCC ec…

    Linux干货 2016-07-10
  • 马哥教育网络班20期+第二周课程练习

    1、Linux上的文件管理类命令都有哪些,其常用的使用方法及其相关示例演示。 2、bash的工作特性之命令执行状态返回值和命令行展开所涉及的内容及其示例演示。 3、请使用命令行展开功能来完成以下练习:    (1)、创建/tmp目录下的:a_c, a_d, b_c, b_d   …

    Linux干货 2016-06-23
  • 考试题目

    1、  简述TCP三次握手四次挥手过程及各过程中客户端和服务器端的状态。 TCP三次握手,四次断开通过以下图示说明: 2、说说进程和线程的区别 (1)一个线程只能输入某一个进程,一个进程可以有多个线程。一个程序至少有一个进程,一个进程至少有一个线程。 (2)进程有独立的地址空间,线程没有独立的地址空间,进程内的多个线程共享进程的地址空间。 (3)线…

    Linux干货 2016-06-19
  • nginx在linux系统应用详解之一基础介绍和全局配置

    一、nginx简介       1、特点:           (1)nginx服务器既可以作为HTTP服务器,也可以作为反向代理服务器,还可以作为邮件服务器;           (2)能够快速响应静态页面的请求;  …

    2017-06-19
  • 网络组Network Team

    网络组Network Team 网络组team:是将多个网卡聚合在一起,从而实现容错和提高吞吐量 1 创建网络组接口 nmcli connection add type team con-name TEAMname ifname INTname [config JSON] TEAMname 指定连接名,INname指定接口名, JSON指定runner方式,…

    Linux干货 2017-05-07
  • 计算机组成、Linux命令基础

    计算机组成 控制器(Control):是整个计算机的中枢神经,其功能是对程序规定的控制信息进行解释,根据其要求进行控制,调度程序、数据、地址,协调计算机各部分工作及内存与外设的访问等。 运算器(Datapath):运算器的功能是对数据进行各种算术运算和逻辑运算,即对数据进行加工处理。 存储器(Memory):存储器的功能是存储程序、数据和各种信号、命令等信息…

    Linux干货 2016-09-19

评论列表(1条)

  • 马哥教育
    马哥教育 2016-08-17 16:21

    写的很好,排版还可以在漂亮一点,加油,都超了!