马哥教育网络班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)
上一篇 2016-08-15 11:53
下一篇 2016-08-15 11:58

相关推荐

  • 第七周-磁盘管理、RAID及Shell脚本练习

    一、创建一个10G分区,并格式为ext4文件系统; (1)、 要求其block大小为2048, 预留空间百分比为2, 卷标为MYDATA, 默认挂载属性包含acl; (2)、挂载至/data/mydata目录,要求挂载时禁止程序自动运行,且不更新文件的访问时间戳; [root@N1 ~]# mkfs.ext4 -b 2048 -m 2 -L MYDATA /…

    Linux干货 2017-08-13
  • Linux基本命令总结

    一.目录相关的命令 mkdir rmdir tree cd ls pwd   二.文件相关命令 less cat more tac rev stat head tail cut grep cp mv rm touch rename   三.分析文本的工具 wc sort uniq cut    

    2017-09-10
  • 特殊权限及facl

    Linux系统上的特殊权限          特殊权限:SUID,  SGID,  STICKY 安全上下文:         1、进程以某用户的身份运行,进程是发起此进程用户的代理,因此用户的身份和权限完成所有操作;     &…

    Linux干货 2016-11-07
  • 搭建lnmp实现动静分离

    LNMP代表的就是:Linux系统下Nginx+MySQL+PHP这种网站服务器架构。 (nginx主机)web 处理静态内容 172.16.250.149 (fpm server   mariad bserver)处理动态内容 172.16.253.131 以上为两台CentOS7.3主机 试验拓扑图如下:   ==…

    2017-07-22
  • SElinux配置httpd

    一、启用SELinux策略并安装httpd服务,改变网站的默认主目录为/website,添加SELinux文件标签规则,使网站可访问     1、修改selinux策略并重启 [root@localhost ~]# vim /etc/selinux/config# This file controls the stat…

    Linux干货 2016-09-19
  • RAID简述和Linux软RAID配置

    RAID简述和Linux软RAID配置 PS:仅为课程练习,原理和配置可能有误,仅供参考,谢谢; 1.RAID功能简述     RAID,全称(Redundant Arrays of Inexpensive Disk或Redundant Arrays of Independent Disk),现在一般多用于后面那个称呼,独立磁盘冗余阵列。RAID的基础概念大…

    Linux干货 2016-07-17

评论列表(1条)

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

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