马哥教育网络班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

相关推荐

  • 文件权限

    普通文件 r: 可以读取文件的内容 w: 可以修改文件的内容 x: 可以执行该文件 执行脚本(不要随便给文件加x权限) 目录文件 r: 用户可以列出目录下有哪些文件(不能查看文件的详细信息) w: 只有w无意义。 x: 用户可以进入该目录(如果知道文件名,且有相对应的文件权限 ,可以执行对应的操作) 权限一般配合使用,不同权限配合有不同效果 rx: 用户可以…

    2017-07-30
  • 推荐-MySQL存储日志并使用Loganalyzer作为前端展示

    MySQL存储日志并使用Loganalyzer作为前端展示 MySQL存储日志并使用Loganalyzer作为前端展示 为什么要使用日志 本文目标 实验拓扑图 实验环境 实验步骤 syslog主机上rsyslog设置 Server1主机上rsyslog设置 Web服务器配置 总结 为什么要使用日志 在生产环境中我们可能需要一个较为完整的日志系统来查看运行中主…

    Linux干货 2016-03-30
  • BIND在生产环境中的创建

    一、实验:BIND二级域的搭建(均以yum安装bind),从实验图中可以看出需要五台虚拟机进行测试 一、准备五台虚拟机 二、配置root服务器 1、YUM安装bind的程序 2、配置bind的主配置文件 3、配置区域文件 4、为了实验的方便进行,把防火墙和SElinux关闭,并留意区域文件的属主属组 5、检查named的主配置文件和区域文件是否语法错误,并启…

    Linux干货 2016-10-05
  • 用户、组、权限和修改

    用户、组和权限     普通用户 1–65535     系统用户  系统已经已经存在专门用来对系统服务或者系统资源进行管理的               1…

    Linux干货 2017-04-04
  • 【N25第二周作业】Linux文件管理命令以及文件名通配glob

    1、Linux下的文件管理类命令使用方法和示例 Linux下的文件管理类命令有如下列举的一些: 目录管理命令:cd,pwd,ls,mkdir,rmdir,tree文件管理命令:touch,cp,mv,rm,stat查看:more,less,head,tail,cat,tac,lsattr,whereis,which权限:chmod,chown,chattr,…

    Linux干货 2016-12-12
  • 马哥教育网络班20期+第九周博客作业

    1、写一个脚本,判断当前系统上所有用户的shell是否为可登录shell(即用户的shell不是/sbin/nologin);分别这两类用户的个数;通过字符串比较来实现; #!/bin/bash export nolginbash export otherbash for i in `grep -o…

    Linux干货 2016-08-09

评论列表(1条)

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

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