LINUX选修课讲义:/etc目录文件介绍

Linux系统环境与基本命令入门:从零到服务器实战的完整指南 操作系统是计算机系统的核心,而Linux作为服务器领域的主流操作系统,其命令行环境是运维与开发人员必须掌握的基础技能。Shell作为用户与内核之间的解释器,通过命令、选项与参数的组合,以及管道符与重定向的灵活运用,能够实现高效的文本处理和系统管理。文件权限、用户管理、进程监控与网络排查等操作,构成了服务器日常运行的基石。在云计算与容器化技术普及的今天,掌握Linux基本命令不仅能提升个人工作效率,更是快速定位线上故障、保障服务稳定的关键能力。本文从搭建练习环境开始,系统梳理了Linux系统环境的核心概念、高 阅读详情
发信人: albin (阿乐斌), 信区: LINUX
标  题: LINUX选修课讲义:/etc目录文件介绍
发信站: 碧海青天 (Fri Apr 23 00:22:02 1999), 转信

版权声明:
    本文内容为大连理工大学LINUX选修课讲义,欢迎大家转载,但禁止使用本材料进行
    任何商业性或赢利目活动。转载时请本保留版权声明。
    
    作者:何斌武,hbwork@dlut.edu.cn,大连理工大学网络中心,April 1999.
    
    URL: ftp://ftp.dlut.edu.cn/pub/PEOPLE/albin/
------------------------------------------------------------------------------
3. 网络配置文件
3.1 /etc/hosts
    #/etc/hosts
    #文件格式: IPaddress hostname aliases
    #文件功能: 提供主机名到IP地址的对应关系,建议将自己经常使用的主机
    #           加入此文件中,也可将没有DNS记录的机器加入到此文件中,
    #           这样会方便网络应用
    127.0.0.1       localhost       localhost.localdomain
    202.118.66.81   helius.dlut.edu.cn      helius

3.2 /etc/resolv.conf
   文件功能:DNS客户机配置文件,设置DNS服务器的IP地址及DNS域名
   相关文件:/etc/host.conf
   文件格式:
        domainname 域名
        search  域名
        nameserver Primary_DNS_Server_IP_address
        nameserver Second_DNS_Server_IP_address
        其中domainname和search可同时存在,也可只有一个;nameserver可指定多个
        
   示例文件内容:
   search dlut.edu.cn
   nameserver 202.118.66.6
   
3.3 /etc/host.conf
   功能:指定主机名查找方法,通常指先查找文件/etc/hosts,找不到时再向DNS服务器请求。
         对于大多数用户不用改动此文件内容。
         
   Linux: /etc/host.conf文件内容
         order hosts, bind
         multi on
   Soalris: /etc/nsswitch.conf 中的hosts项
                hosts files, dns
3.4 /etc/HOSTNAME ( Linux Redhat 5.x Distribution)
    功能:设置主机名,不同LINUX之间可能有所差别,请使用
        egrep hostname /etc/rc.d/init.d/*
        或
        egrep hostname /etc/init.d/*
        查找相应版本上的主机名设置文件及方法。
        
    Linux Redhat 5.x对应文件: /etc/sysconfig/network的HOSTNAME项。

3.5 /etc/inetd.conf

   Internet 超级服务器, 相关程序: /usr/sbin/inetd
   相应服务:
                telnet
                ftp
                pop3
                r*      rsh rcp rlogin (建议最好关闭r服务)
                其他服务最好关掉

#
# inetd.conf    This file describes the services that will be available
#               through the INETD TCP/IP super server.  To re-configure
#               the running INETD process, edit this file, then send the
#               INETD process a SIGHUP signal.
#
# Version:      @(#)/etc/inetd.conf     3.10    05/27/93
#
# Authors:      Original taken from BSD UNIX 4.3/TAHOE.
#               Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
#
# Modified for Debian Linux by Ian A. Murdock <imurdock@shell.portal.com>
#
# Modified for RHS Linux by Marc Ewing <marc@redhat.com>
#
# <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
#
# Echo, discard, daytime, and chargen are used primarily for testing.
#
# To re-read this file after changes, just do a 'killall -HUP inetd'
#
#echo   stream  tcp     nowait  root    internal
#echo   dgram   udp     wait    root    internal
#discard        stream  tcp     nowait  root    internal
#discard        dgram   udp     wait    root    internal
#daytime        stream  tcp     nowait  root    internal
#daytime        dgram   udp     wait    root    internal
#chargen        stream  tcp     nowait  root    internal
#chargen        dgram   udp     wait    root    internal
#
# These are standard services.
#
ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  in.ftpd -l -a
telnet  stream  tcp     nowait  root    /usr/sbin/tcpd  in.telnetd
gopher  stream  tcp     nowait  root    /usr/sbin/tcpd  gn

# do not uncomment smtp unless you *really* know what you are doing.
# smtp is handled by the sendmail daemon now, not smtpd.  It does NOT
# run from here, it is started at boot time from /etc/rc.d/rc#.d.
#smtp   stream  tcp     nowait  root    /usr/bin/smtpd  smtpd
#nntp   stream  tcp     nowait  root    /usr/sbin/tcpd  in.nntpd
#
# Shell, login, exec and talk are BSD protocols.
#
shell   stream  tcp     nowait  root    /usr/sbin/tcpd  in.rshd
login   stream  tcp     nowait  root    /usr/sbin/tcpd  in.rlogind
#exec   stream  tcp     nowait  root    /usr/sbin/tcpd  in.rexecd
talk    dgram   udp     wait    root    /usr/sbin/tcpd  in.talkd
ntalk   dgram   udp     wait    root    /usr/sbin/tcpd  in.ntalkd
#dtalk  stream  tcp     waut    nobody  /usr/sbin/tcpd  in.dtalkd
#
# Pop and imap mail services et al
#
pop-2   stream  tcp     nowait  root    /usr/sbin/tcpd  ipop2d
pop-3   stream  tcp     nowait  root    /usr/sbin/tcpd  ipop3d
imap    stream  tcp     nowait  root    /usr/sbin/tcpd  imapd
#
# The Internet UUCP service.
#
#uucp   stream  tcp     nowait  uucp    /usr/sbin/tcpd  /usr/lib/uucp/uucico    -l
#
# Tftp service is provided primarily for booting.  Most sites
# run this only on machines acting as "boot servers." Do not uncomment
# this unless you *need* it.  
#
#tftp   dgram   udp     wait    root    /usr/sbin/tcpd  in.tftpd
#bootps dgram   udp     wait    root    /usr/sbin/tcpd  bootpd
#
# Finger, systat and netstat give out user information which may be
# valuable to potential "system crackers."  Many sites choose to disable 
# some or all of these services to improve security.
#
# cfinger is for GNU finger, which is currently not in use in RHS Linux
#
finger  stream  tcp     nowait  root    /usr/sbin/tcpd  in.fingerd
#cfinger stream tcp     nowait  root    /usr/sbin/tcpd  in.cfingerd
#systat stream  tcp     nowait  guest   /usr/sbin/tcpd  /bin/ps -auwwx
#netstat        stream  tcp     nowait  guest   /usr/sbin/tcpd  /bin/netstat    -f inet
#
# Time service is used for clock syncronization.
#
time    stream  tcp     nowait  nobody  /usr/sbin/tcpd  in.timed
time    dgram   udp     wait    nobody  /usr/sbin/tcpd  in.timed
#
# Authentication
#
auth   stream  tcp     nowait    nobody    /usr/sbin/in.identd in.identd -l -e -o
#
# End of inetd.conf

linuxconf stream tcp wait root /bin/linuxconf linuxconf --http




3.6 inetd.conf相关文件/etc/services(SYSV/BSD/LINUX相同)
    基本不用编辑,linux自带的已包含大部分服务, Solaris 可能需要增加(POP3),
    参考相应的服务器安装说明,在此文件中列出了所有可用的网络服务。

#
# services      This file describes the various services that are
#               available from the TCP/IP subsystem.  It should be
#               consulted instead of using the numbers in the ARPA
#               include files, or, worse, just guessing them.
#
# Version:      @(#)/etc/services       2.00    04/30/93
#
# Author:       Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
#
# 文件格式:服务名称   端口号/协议   服务别名
tcpmux          1/tcp                           # rfc-1078
echo            7/tcp
echo            7/udp
discard         9/tcp           sink null
discard         9/udp           sink null
systat          11/tcp          users
daytime         13/tcp
daytime         13/udp
netstat         15/tcp
qotd            17/tcp          quote
chargen         19/tcp          ttytst source
chargen         19/udp          ttytst source
ftp-data        20/tcp
ftp             21/tcp
telnet          23/tcp
smtp            25/tcp          mail
time            37/tcp          timserver
time            37/udp          timserver
rlp             39/udp          resource        # resource location
name            42/udp          nameserver
whois           43/tcp          nicname         # usually to sri-nic
domain          53/tcp
domain          53/udp
mtp             57/tcp                          # deprecated
bootps          67/udp                          # bootp server
bootpc          68/udp                          # bootp client
tftp            69/udp
gopher          70/tcp                          # gopher server
rje             77/tcp
finger          79/tcp
http            80/tcp                          # www is used by some broken 
www             80/tcp                          # progs, http is more correct
link            87/tcp          ttylink
kerberos        88/udp          kdc             # Kerberos authentication--udp
kerberos        88/tcp          kdc             # Kerberos authentication--tcp
supdup          95/tcp                          # BSD supdupd(8)
hostnames       101/tcp         hostname        # usually to sri-nic
iso-tsap        102/tcp
x400            103/tcp                         # ISO Mail
x400-snd        104/tcp
csnet-ns        105/tcp
pop-2           109/tcp                         # PostOffice V.2
pop-3           110/tcp                         # PostOffice V.3
pop             110/tcp                         # PostOffice V.3
sunrpc          111/tcp
sunrpc          111/tcp         portmapper      # RPC 4.0 portmapper UDP
sunrpc          111/udp
sunrpc          111/udp         portmapper      # RPC 4.0 portmapper TCP
auth            113/tcp         ident           # User Verification
sftp            115/tcp
uucp-path       117/tcp
nntp            119/tcp         usenet          # Network News Transfer
ntp             123/tcp                         # Network Time Protocol
ntp             123/udp                         # Network Time Protocol
netbios-ns      137/tcp         nbns
netbios-ns      137/udp         nbns
netbios-dgm     138/tcp         nbdgm
netbios-dgm     138/udp         nbdgm
netbios-ssn     139/tcp         nbssn
imap            143/tcp                         # imap network mail protocol
NeWS            144/tcp         news            # Window System
snmp            161/udp
snmp-trap       162/udp
exec            512/tcp                         # BSD rexecd(8)
biff            512/udp         comsat
login           513/tcp                         # BSD rlogind(8)
who             513/udp         whod            # BSD rwhod(8)
shell           514/tcp         cmd             # BSD rshd(8)
syslog          514/udp                         # BSD syslogd(8)
printer         515/tcp         spooler         # BSD lpd(8)
talk            517/udp                         # BSD talkd(8)
ntalk           518/udp                         # SunOS talkd(8)
efs             520/tcp                         # for LucasFilm
route           520/udp         router routed   # 521/udp too
timed           525/udp         timeserver
tempo           526/tcp         newdate
courier         530/tcp         rpc             # experimental
conference      531/tcp         chat
netnews         532/tcp         readnews
netwall         533/udp                         # -for emergency broadcasts
uucp            540/tcp         uucpd           # BSD uucpd(8) UUCP service
klogin          543/tcp                         # Kerberos authenticated rlogin
kshell          544/tcp         cmd             # and remote shell
new-rwho        550/udp         new-who         # experimental
remotefs        556/tcp         rfs_server rfs  # Brunhoff remote filesystem
rmonitor        560/udp         rmonitord       # experimental
monitor         561/udp                         # experimental
pcserver        600/tcp                         # ECD Integrated PC board srvr
mount           635/udp                         # NFS Mount Service
pcnfs           640/udp                         # PC-NFS DOS Authentication
bwnfs           650/udp                         # BW-NFS DOS Authentication
kerberos-adm    749/tcp                         # Kerberos 5 admin/changepw
kerberos-adm    749/udp                         # Kerberos 5 admin/changepw
kerberos-sec    750/udp                         # Kerberos authentication--udp
kerberos-sec    750/tcp                         # Kerberos authentication--tcp
kerberos_master 751/udp                         # Kerberos authentication
kerberos_master 751/tcp                         # Kerberos authentication
krb5_prop       754/tcp                         # Kerberos slave propagation
listen          1025/tcp        listener RFS remote_file_sharing
nterm           1026/tcp        remote_login network_terminal
kpop            1109/tcp                        # Pop with Kerberos
ingreslock      1524/tcp
tnet            1600/tcp                        # transputer net daemon
cfinger         2003/tcp                        # GNU finger
nfs             2049/udp                        # NFS File Service
eklogin         2105/tcp                        # Kerberos encrypted rlogin
krb524          4444/tcp                        # Kerberos 5 to 4 ticket xlator
irc             6667/tcp                        # Internet Relay Chat
dos             7000/tcp        msdos

# End of services.
linuxconf       98/tcp          # added by linuxconf RPM

3.7 /etc/hosts.allow /etc/hosts.deny (Linux下,或使用了tcpd, 参考inetd.conf)

    /etc/hosts.allow 设置允许使用inetd服务的机器,如: All:202.118即允许所有来自
                202.118.x.x的请求
    /etc/hosts.deny 设置不允许使用inetd的机器
    
    这两个文件的设定顺序请参考在线文档:
   man tcpd
   man hosts.allow
   man hosts.deny

   Internet 网络服务访问控制文件,

   对于安全性要求较高的服务器建议采用xinetd替代inetd,
   xinetd debian自带,其他的可以用源代码进行编译安装

3.8 /etc/networks  /etc/netmasks

     列出路由所需要的网络地址,相关命令/usr/sbin/route,当然也可以不使用这两个
     文件,在维护路由表时可直接使用IP地址及网络屏蔽位。
     
     Example:
        /etc/networks
        dlrin   202.199.128.0
        /etc/netmasks
        202.199.128.0 255.255.240.0
     加入静态路由表项:
     

     +---------------+     DDN
     | Cisco 2511    +<-------------->DLMU 202.118.64.0/255.255.255.0
     |               +<-------------->DLNA 210.47.192.0/255.255.240.0
     +-------+-------+
             | 202.118.66.254
             |                                  202.118.66.16
     +-------+-------+       +-------------+     +-----------+
     |  Switch/HUB   +-------+网络中心     +-----+ LAN Router+
     +-------+-------+       +-------------+     +------+----+
             |                                          |
             |
             |                                202.118.68.0/255.255.252.0
             |              +--------------+
             +--------------+ 202.118.66.81+ (测试机器)
             |              +--------------+
             |
             |
             | 202.118.66.1(Default Router)
     +-------+-------+
     |    路由器     +
     +-------+-------+
             |202.112.30.65/255.255.255.252
             | DDN 
             | PPP
             |
             |202.112.30.66/255.255.255.252
        Cernet/Internet



    (1) 202.118.66.81(Helius)   <->  202.118.66.18 (peony)

       202.118.066.081
       255.255.255.0   And
       -------------------
       202.118.066.0   网络地址   在同一个ip网络段

       IP Address   <-> MAC(Media Access Address)
       202.118.66.18            08:00:20:96:01:6A 
       202.118.66.81            00:80:C8:4C:6A:D0 
       202.118.66.1             00:60:5C:F3:FF:75 

       202.118.66.81 -> 202.118.66.18
       以太网的数据包:

           08:00:20:96:01:6A + 00:80:C8:4C:6A:D0  + ip数据

      (2) 202.118.66.81 -> 202.112.0.36
          不在同一个ip段, 通过间接传送(通过路由器).
  [hbwork@linden hbwork]$ netstat -rn
  Kernel IP routing table
  Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
  202.118.66.0    0.0.0.0         255.255.255.0   U      1500 0          0 eth0
  127.0.0.0       0.0.0.0         255.0.0.0       U      3584 0          0 lo
  0.0.0.0         202.118.66.1    0.0.0.0         UG     1500 0          0 eth0 
  ^^^^^^^
  Default Router


     (3) 加入静态路由
        相关命令:/usr/sbin/route或 /sbin/route

        linux下需要加入自己网络的路由表项
        /sbin/route add -net 202.118.66.0 netmask 255.255.255.0 eth0

        /sbin/route add -net 202.199.128.0 netmask 255.255.240.0 gw 202.118.66.254
        Or:
        /sbin/route add -net dlrin gw 202.118.66.254
        Or:
        /sbin/route add -net dlrin gw dlrin-gw
        /sbin/route add default gw 202.118.66.1



9. /etc/passwd
   用户口令文件
10. /etc/shadow  (如果有此文件,系统支持shadow机制)
    $ls -l /etc/shadow
    -rwx------   root   ....    /etc/shadow

11. /etc/fstab
    File System Table

#设备名    MountPoint   Filesystem Type  加载选项 ... fsck标志
/dev/hda1       /       ext2    defaults        1       1
/dev/hda6       /home   ext2    defaults        1       2
/dev/hda3       /usr    ext2    defaults        1       2
/dev/hda5       /var    ext2    defaults        1       2
/dev/hda2       swap    swap    defaults        0       0
/dev/fd0        /mnt/floppy     auto    sync,user,noauto,nosuid,nodev,unhide   0
    0
/dev/cdrom      /mnt/cdrom      auto    user,noauto,nosuid,nodev,ro     0      0
 none    /proc   proc    defaults        0       0    

   Solairs下对应文件:  /etc/vfstab

12. /etc/exports

    NFS(Network File System) Server 输出文件系统表, 最好不使用NFS. 

   nfs相关进程: 
        Solaris: mountd , nfsiod
                 /etc/init.d/nfs.server
        Linux:  内核支持nfs, /proc/filesystem, 也可以通过加载modules实现,

13./etc/defaultrouter (Solaris 2.x)
   内容为Default Router的ip地址,
   在linux下:
        Redhat 5.x: /etc/sysconfig/network
                GATEWAY=202.118.66.1
                GATEWAYDEV=eth0  
        Debian: /etc/init.d/network
                #! /bin/sh
                ifconfig lo 127.0.0.1
                route add -net 127.0.0.0
                IPADDR=202.118.66.88
                NETMASK=255.255.255.0
                NETWORK=202.118.66.0
                BROADCAST=202.118.66.255
                GATEWAY=202.118.66.1
                ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
                route add -net ${NETWORK}
                [ "${GATEWAY}" ] && route add default gw ${GATEWAY} metric 1 

14. /etc/bashrc /etc/csh.cshrc /etc/profile
    /etc/bashrc  BASH(Bourne Again Shell) RunTime Command 
                Shell Script 用的最多

        系统用户默认的环境设置, PATH, umask, TERM Type
    /etc/csh.cshrc CSH Runtime COmmand 


15. /etc/ftpaccess  
    FTP访问控制文件, 文件位置可变 , 通过
    #egrep ftp /etc/inetd.conf
    ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  in.ftpd -l -a 
                                                            ^^^^^^
                                                   ftp服务器守护进程文件名
    #which in.ftpd
    /usr/sbin/in.ftpd
    #strings  /usr/sbin/in.ftpd |egrep ftpaccess
     /etc/ftpaccess 
    
    相关配置在ftp服务器配置中讲述。

16. /etc/ftpusers
    不允许ftp的用户列表,一般包括root, uucp, bin等

17. /etc/ftpconvions /etc/ftpgroups  
     FTP服务器配置文件

18. /etc/group  用户组文件


19. /etc/sendmail.cf (Linux)   Sendmail(EMAIL服务器)配置文件
    /etc/sendmail.cw           本地主机名
                主机名: gingko.dlut.edu.cn
                希望接收: user@gingko.dlut.edu.cn
                          user@mail.dlut.edu.cn
                          user@dlut.edu.cn
    /etdc/aliases       邮件别名文件
    /etc/aliases.db     邮件别名二进制数据文件, 用newaliases建立
    /etc/sendmail.hf    sendmail 帮助文件, 
        $telnet mailserver 25
        Trying 202.118.66.8...
        Connected to gingko.
        Escape character is '^]'.
        220 gingko.dlut.edu.cn ESMTP Sendmail 8.9.1/8.9.1; Tue, 2 Feb 1999 10:41:20 +080
        0 (CST)        
        HELP
        214-This is Sendmail version 8.9.1
        214-Topics:
        214-    HELO    EHLO    MAIL    RCPT    DATA
        214-    RSET    NOOP    QUIT    HELP    VRFY
        214-    EXPN    VERB    ETRN    DSN
        214-For more info use "HELP <topic>".
        214-To report bugs in the implementation send email to
        214-    sendmail-bugs@sendmail.org.
        214-For local information send email to Postmaster at your site.
        214 End of HELP info  

    以上目录结构是Linux的目录结构, Solaris 2.x目录结构是:
        /etc/mail/sendmail.cf
        /etc/mail/sendmail.cw
        /etc/mail/sendmail.hf
        /etc/mail/aliases
        /etc/mail/aliases.db 

20. /etc/issue   系统进站提示信息(主控台用) 
    /etc/issue.net telnet时显示信息( strings in.telnetd |egrep issue)
    /etc/motd    用户进入系统后的提示信息

21. /etc/named.boot
     DNS(BIND 4.9.x) 启动文件
     示例文件:(Caching Only Server)
     directory /etc/namedb

     primary 0.0.127.in-addr.arpa  named.local
     cache . root.cache

     其中root.cache 文件可通过dig得到:
     
     dig @ns.internic.net . ns > /etc/namedb/root.cache

     named.local文件内容如下:
     
     @  IN      SOA localhost. root.localhost. (
                1999020301
                10800
                3600
                86400
                86400 )

         IN    NS       localhost.

     1  IN      PTR     localhost.
     /etc/named.conf
     DNS(BIND 8.1.x) 启动文件
     (在Redhat 5.2下可用/usr/doc/bind-8.1.2/named-bootconf.pl将bind 4.9.x
     的named.boot文件转换为bind8的named.conf文件格式, 执行过程如下:
     /usr/doc/bind-8.1.2/named-bootconf.pl /etc/named.boot > /etc/named.conf)


     
22. /etc/host.equiv
    $HOME/.rhosts
    R*(rlogin, rsh , rcp, rexec)服务信任主机
    格式:
        主机名(FQDN)    用户列表
    
23. /etc/ld.so.conf (LINUX)
    动态链接库文件目录列表, 相应命令ldconfig

     $LD_LIBRARY_PATH Solaris 下相应的环境变量

     用ldd 列出相应文件所使用的动态链接库
     /etc/default[119]ldd /usr/ucb/ls
       libc.so.1 =>     /usr/lib/libc.so.1
       libdl.so.1 =>    /usr/lib/libdl.so.1 

     *修改过此文件之后请使用命令ldconfig重新生成目录列表及连接库文件列表。
     
24. /etc/pam.d/login ( Linux Redhat)
        auth       required     /lib/security/pam_securetty.so 
    /etc/securetty (Linux Redhat, Debian)
        root可登录的终端设备列表, tty[1-8] 为主控台上的设备,
        ttyp* (LINUX)远程登录终端(TELNET)设备

    /etc/default/login (Solaris)
        # If CONSOLE is set, root can only login on that device.
        # Comment this line out to allow remote login by root.
        #
        CONSOLE=/dev/console  
    注释掉相应的记录即可允许超级用户root从远程主机telnet登录


    /etc/login.defs Linux Debian 登录控制文件


25. Linux Loader /etc/lilo.conf
    多重启动文件, 
    **** 修改完此文件后一定需要执行lilo, 
    **** 重新编译安装新的linux kernel修改此文件并执行lilo

26. /etc/syslog.conf 
    syslogd configuration file, 

27. /etc/smb.conf
    SAMBA  服务器配置文件,将linux的文件系统与Windows 9x/NT共享
28. /etc/nologin
    系统在要关机时不希望用户登录进来,就产生此文件,此文件内容为显示给用户的有
    关拒绝连接的信息,用户此时就不能进入系统。当系统重新启动时如果有此文件,则
    机器启动后任何用户不能使用系统,此时可考虑从软盘或光盘引导删除此文件,然后
    再重新启动系统。
    
29. /etc/security
    设定那些终端可以让root登录,一般情况下设定为只有console上的用户可能用root.
    
    注:Redhat下使用了PAM机制,相应的文件为/etc/securetty. 

30. /etc/X11/*
     XFree86配置文件。

31. /etc/shells
    用户可以使用的shell列表,如果强行修改/etc/passwd文件,也可以使用不在列表中
    的shell程序,但对于shell不在此列表中的用户将无法使用FTP连接本系统。

32. /etc/mtab
    系统在启动时创建的信息文件,内容为已经mount的文件系统,此文件内容是动态更
    新的,参考/proc/mounts。



--
[m[1;35m※ 来源:.碧海青天 bbs.dlut.edu.cn.[FROM: apple.dlut.edu.c][m
大连理工大学Linux讲义 个人工作笔记 LINUX 使用大全,陈向阳、方汉编著,科学出版社 UNIX及Internet实用安全技术 UNIX Unleashed, System Administrator Edition电子版 LINUX HOWTO Sendmail , Second Edition, 英文版 LINUX FAQ UNIX FAQ 立即下载

相关推荐

武汉大学通识教育选修课程目录.pdf

武汉大学通识教育选修课程目录.pdf。。。。。

[G]Linux系统中网络配置详解

Linux系统中网络配置详解      从linux诞生的那一天起,就注定了它的网络功能空前地强大.所以在linux系统中如何配置网络,使其高效,安全的工作就显得十分重要.下面我们就从网络设备的安装,网络服务的设置和网络安全性三个方面来介绍一下linux系统中网络的设置.一.安装和配置网络设备  在安装linux时,如果你有网卡,安装程序将会提示你给出tcp/ip网络的配置参数,如本机的ip地址,

1353

Apifox CLI + Claude Skills:将接口自动化测试融入ai

基于 Apifox CLI、Claude Code以及Claude Skills组合,实现自然语言触发接口自动化测试。

wwz_0012的博客 596

linux网络服务详解,Linux网络服务器配置基础详解 (3)

Linux网络服务器配置基础详解 (3)Linux网络服务器配置基础详解 (3)第三步:编辑“inetd.conf”文件(vi /etc/inetd.conf),禁止所有不需要的服务,如:ftp、 telnet、 shell、 login、 exec、talk、ntalk、 imap、 pop-2、pop-3、finger、auth,等等。如果你觉得某些服务有用,可以不禁止这些服务。但是,把这些服...

weixin_39585761的博客 204

simulink中无迹卡尔曼(UKF)模块使用

simulink的UKF模块简单说明

qq_41059950的博客 2819

耶鲁大学《博弈论》课程——逆向归纳

耶鲁大学《博弈论》课程——逆向归纳

ZYLer_的博客 7869

LINUX选修课讲义:UNIX常用命令

发信人: albin (阿乐斌), 信区: LINUX标 题: LINUX选修课讲义:UNIX常用命令发信站: 碧海青天 (Wed Apr 21 23:14:19 1999), 转信版权声明: 本文内容为大连理工大学LINUX选修课讲义,欢迎大家转载,但禁止使用本材料进行 任何商业性或赢利性活动。转载时请保留本版权声明。 作者:何斌武,hbwor

wangxd的专栏 1597

ROS开发者的福音:用Anaconda虚拟环境解决Python包冲突(附完整配置流程)

本文为ROS开发者提供了使用Anaconda虚拟环境解决Python包冲突的完整方案。通过分析冲突根源,详细介绍了Miniconda安装、专用环境创建以及核心桥梁包的配置流程,并阐述了“混合环境运行”与“纯虚拟环境构建”两种实战工作流,帮助开发者实现ROS核心与特定Python库的和谐共存,从而提升开发效率和项目可维护性。

weixin_28835789的博客 338

LINUX选修课讲义:文件系统

发信人: albin (阿乐斌), 信区: LINUX标 题: LINUX选修课讲义:文件系统发信站: 碧海青天 (Wed Apr 21 23:35:36 1999), 转信版权声明: 本文内容为大连理工大学LINUX选修课讲义,欢迎大家转载,但禁止使用本材料进行 任何商业性或赢利性活动。转载时请保留本版权声明。 作者:何斌武,hbwork@dl

wangxd的专栏 1016

VH6501干扰仪的使用

触发模式方法备注External Trigger(外部触发)使用VH6501的I/O口作为触发源Frame Trigger(报文触发)设定被干扰报文的触发位置,并发送干扰位序列/报文software Trigger(软件触发)配置好干扰序列后直接发送Error Frame Trigger(错误帧触发)基于错误帧标识位为触发条件触发干扰Direction Trigger(发送方向触发)根据TX/RX发送/接收方作为触发条件Inverted Trigger(反向触发)

帮助100万人颠覆负面潜意识,实现人生蜕变,培养1万名潜意识开发导师 9047

SAP 业务技术平台(BTP) Workflow(工作流)功能介绍

这背后其实发生了很多事情:Workflow 应用里 Determine Equipment Service Task 得到执行,通过 HTTP POST,消费部署在 SAP BTP 上的 Business Rules Service,后者根据我们在 Start New Instance 里传入的 Sample Data,返回自动决定出的设备明细。关于这个 SAP BTP 开发工具的更多介绍,参考我的文章:SAP 新一代全栈开发工具:SAP Business Application Studio.

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 8752

LINUX选修课讲义:网络配置文件(1)

发信人: albin (阿乐斌), 信区: LINUX标 题: LINUX选修课讲义:网络配置文件(1)发信站: 碧海青天 (Wed Apr 21 23:37:53 1999), 转信版权声明: 本文内容为大连理工大学LINUX选修课讲义,欢迎大家转载,但禁止使用本材料进行 任何商业性或赢利性活动。转载时请保留本版权声明。 作者:何斌武,hbwo

wangxd的专栏 857

大模型知识边界探索:LLM设计的极限测试

最优化理论是数学中的一个分支,主要研究如何从给定的一组约束条件下找到最优解。目标函数:定义了需要优化的指标,可以是最大化或最小化。约束条件:定义了在优化过程中需要满足的限制条件。无约束优化:目标函数和约束条件都不存在。有约束优化:目标函数存在,但存在约束条件。多目标优化:同时需要优化多个目标函数。极限测试(Ultimate Test)是一种系统性的方法,用于评估大型模型(如LLM)在极端条件下的性能和稳定性。极端数据分布:与模型训练数据分布显著不同的数据集。极端计算资源。

AI天才研究院 431

LINUX选修课讲义:汉字终端的安装!

发信人: albin (阿乐斌), 信区: LINUX标 题: LINUX选修课讲义:汉字终端的安装!发信站: 碧海青天 (Sun Apr 25 23:33:26 1999), 转信版权声明: 本文内容为大连理工大学LINUX选修课讲义,欢迎大家转载,但禁止使用本材料进行 任何商业性或赢利性活动。转载时请保留本版权声明。 作者:何斌武,hbwor

wangxd的专栏 920

Authentication Assertion Tickets,SAP 系统到系统单点登录里的短命凭证

SAP 系统间的身份传递机制存在 Authentication Assertion Ticket 和 SAP Logon Ticket 两种易混淆的凭证。前者用于系统间短时身份委托(有效期2分钟,通过HTTP头传输),后者用于浏览器SSO(可配置有效期,通过Cookie传输)。Assertion Ticket依赖签发系统的数字签名和严格的时间同步,适用于ABAP/Java系统间的后台作业调用。现代SAP架构已转向OAuth 2.0等标准协议,但老系统中仍需注意两种票据的关键差异:传输方式、有效期、接收方限制

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 601

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

Linux操作系统选修课期末大作业报告:实用的Linux环境实践项目

Linux操作系统选修课期末大作业报告:实用的Linux环境实践项目 【下载地址】Linux操作系统选修课期末大作业报告 该项目为《Linux操作系统》选修课的期末大作业,旨在通过实际操作加深对Linux系统管理的理解。任务包括创建用户、添加虚拟硬盘、自动清理临时目录、配置远程访问、安装Telnet服务以及网络配置等。通...

gitblog_06735的博客 808

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

《Linux操作系统》选修课期末大作业报告

《Linux操作系统》选修课期末大作业报告 【下载地址】Linux操作系统选修课期末大作业报告 该项目为《Linux操作系统》选修课的期末大作业,旨在通过实际操作加深对Linux系统管理的理解。任务包括创建用户、添加虚拟硬盘、自动清理临时目录、配置远程访问、安装Telnet服务以及网络配置等。通过完成这些任务,学生能够全...

gitblog_06727的博客 553

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

linux文件操作常见考题_江西理工大学linux操作系统测试题(看完必过)

江西理工大学南昌校区专业选修课linux操作系统期末测试题一、选择1、在vi编辑器中从插入模式切换到命令模式需要按( D )A. Tab键 B. Shift键 C. F2键 D. Esc键’2、在vi编辑器中保存修改的命令是( B )A. :q! B. :w C. :q D. :wq3、Linux下使用安全shell登录远程主机的命令是( C )A. ksh B....

weixin_35993844的博客 492

网络配置文件(1)

原贴:http://blog.chinaunix.net/u/13329/showart.php?id=81171 网络配置文件(1)    

最实用的Linux博客 997

南邮linux编程实验报告,小弟在南邮选了一门令我终生后悔的选修课:linux基础教程,考试不会了!-!...

小弟在南邮选了一门令我终生后悔的选修课:linux基础教程,考试不会了!-!(2011-02-20 23:07:14)标签:杂谈1。将某目录下面所有的文件名后面加上所有者的名字,比如a.txt的所有者为owner,修改后为a[owner].txt文件。基本要求:(1)使用方法: usage: 程序名称 目录名称 若没有”目录名称”参数则修改当前目录下文件名称。 (2)对目录中的子目录不做变化。(3...

weixin_36163101的博客 848

AI自动把课程视频变成讲义:完整流程与实操指南

视频学习虽然直观,但线性播放的特性让笔记整理变得低效。语音转文字技术通过抽取音轨、识别音频并输出带时间戳的逐字稿,解决了视频无法检索的痛点;大模型在此基础上进一步对文本进行清洗、重构和精炼,自动生成结构化讲义。整套流程包括FFmpeg抽音频、faster-whisper转写、大模型整理与Markdown导出,兼顾本地部署的隐私性和云端接口的便捷性。该方案适用于网课回放、会议纪要、培训录像等场景,让用户从频繁暂停回放中解放出来,实现“视频进,讲义出”的自动化内容生产。

weixin_34290631的博客 795

Linux基础指令:从零开始掌握命令行(合集)

每一行命令的执行,都是对确定性的一次祈祷。今天聊 Linux 基础指令。

kiracrimson的博客 353

Bourne Shell及shell编程

版权声明: 本文内容为大连理工大学LINUX选修课讲义,欢迎大家转载,但禁止使用本材料进行 任何商业性或赢利性活动。转载时请保留本版权声明。 作者:何斌武,hbwork@dlut.edu.cn,大连理工大学网络中心,April 1999. URL: ftp://ftp.dlut.edu.cn/pub/PEOPLE/albin/ Bourne Shell 介绍:Bourne Shell 基础及其

淋雨的感觉's bolog 1679

Linux命令从入门到精通:系统管理、文件操作与网络诊断实战指南

在计算机操作系统中,命令行界面(CLI)是用户与内核交互的核心桥梁,其设计哲学源于“一切皆文件”的抽象理念。通过将设备、数据、配置等系统资源统一抽象为文件,操作系统得以提供一套简洁而强大的管理接口。Linux命令作为这套接口的具体实现,其技术价值在于通过模块化、可组合的工具链,实现对系统资源的精细控制和自动化处理。从文件权限管理到进程调度,从文本处理到网络诊断,这些命令构成了系统管理员、开发工程师进行日常运维、故障排查和性能优化的基础工具箱。在实际应用场景中,例如通过`grep`和`awk`进行日志分析,或

weixin_30596023的博客 373

Linux零基础入门:从虚拟机安装到核心命令实战完整指南

Linux作为现代计算的核心操作系统,其设计哲学基于“一切皆文件”和模块化原则,通过内核管理硬件资源并提供系统调用接口。理解其多用户、权限管理和进程调度等核心机制,是掌握服务器运维、云计算及容器化等技术栈的基石。对于开发者和运维工程师而言,熟练使用Linux命令行与Shell脚本,能极大提升环境部署、问题排查和自动化运维的效率。本文聚焦于Ubuntu发行版,通过虚拟机搭建实验环境,系统讲解从系统初始化、软件包管理到文件操作、权限控制及进程监控等实战命令,帮助初学者快速构建Linux知识体系并应用于后端开发、

cixu3288的博客 376
上一篇: LINUX选修课讲义:文件系统
下一篇: LINUX选修课讲义:汉字终端的安装!
wangxd
博客等级 码龄26年 4粉丝 3原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值