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

相关推荐

  • 马哥教育千万级PV实战大揭秘

    又到了激动人心的架构实战项目实践时间,马哥教育面授班的学员都很期待这一刻的到来,因为经过此次洗礼,能让自己成长更多! 上周二,马哥教育张Sir带领18期面授班的学员们做千万PV级别的电商架构实战项目!新增的多台R710企业级服务器设备,轻松搭建大数据、云计算等高端实验环境,让实战,更加真实!相信经过这场实战的洗礼,小伙伴们架构技能会有更大提升! 【张Sir生…

    2016-06-30
  • # Linux运维入门初步—–第二周

    标签(空格分隔): Linux入门 linux 运维 — 写作:N27_李伟 2017-7-13一、 Linux上常用的文件管理命令都有哪些,使用方法1. 文件类型的分类文件类型:– 普通文件类型d:目录文件b:块设备c:字符设备l:符号链接文件p:管道文件,pipes:套接字文件,socket例如: [root@loong ~]# …

    Linux干货 2017-07-19
  • 初识Nginx

    前言:   Nginx介绍:    Nginx(engine x)是由俄罗斯人logor sysoev研发的;官方网站:nginx.org;nginx是一个轻量级的高性能的web服务器和反向代理服务器;nginx本身一个处理静态资源的web服务器,但是通过加装fastcgi等模块,可是支持动态资源;可以为IMAP/POP3/SM…

    Linux干货 2015-06-23
  • windows server 2008 r2 每隔一段时间自动关机

    首先来说一下我的狗血经历:     话说作为一个地铁汪,每天背着电脑从房山到朝阳那简直就是能累死我的节奏,所以我跟公司申请我不要用自己的笔记本了(补助我不要了)。最后公司把一台不用的server 2008r2给我用,12G内存,志强CPU,跑虚拟机杠杠的。 但是噩梦开始了,我发现一个特点,这台server 2008 r…

    2015-11-26
  • 文件查找、压缩、归档

    一、文件查找 非实时查找(数据库查找)locate;实时查找find locate:从系统上预建的文件索引数据库 /var/lib/mlocate/mlocate.db查找,但是依赖于事先构建的索引; 索引的构建是在系统较为空闲时自动进行,管理员手动的更新数据库(updatedb),得用updatedb命令跟新数据库,才能快速查找,也要根据权限搜索…

    Linux干货 2016-11-27

评论列表(1条)

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

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