【问题标题】:What is the difference between /etc/apache2 and /usr/sbin/apache2 in Ubuntu?Ubuntu 中的 /etc/apache2 和 /usr/sbin/apache2 有什么区别?
【发布时间】:2016-05-06 07:09:26
【问题描述】:

我想知道/usr/sbin/apache2/etc/apache2 之间到底有什么区别。我知道/etc 包含所有已安装的软件包以及必要的配置文件,但/usr/sbin/apache2 是我遇到的问题。谁能帮帮我?

【问题讨论】:

  • Paul 我知道文件层次结构,但是当我将目录更改为 /usr/sbin/ 并尝试使用此“nano apache2”时,我得到了一个用户无法读取的 MAC 编码文件。所以很明显它与机器语言有关,我想澄清的是/ usr / sbin中的apache2是什么东西?目录?文件?还是 Web 服务器的可执行文件?
  • 阅读 /etc 和 /usr/sbin 中的各种内容的描述并考虑一下。您知道文件系统层次结构,但不知道如何区分文件和目录?
  • 保罗听我想知道/usr/sbin/apache2是什么样的文件?
  • 引用@PaulCrovella 的链接:“与/bin 一样,此目录包含启动系统所需的命令,但普通用户通常不会执行这些命令。” ( sbin)

标签: linux ubuntu apache2


【解决方案1】:

通常目录和其中的文件都有一定的含义:-

/etc - directory is for storing the configuration files.
/usr - /usr/bin - user's executable binary files
     - /usr/sbin - user's executable binary files that can only be run with root privileges.

因此 /usr/sbin/apache2 是 apache2 命令的完整路径,就像 apache2 命令所在的位置及其二进制文件一样。 /etc 中的所有 apache2 相关文件都是其配置文件。希望对您有所帮助。

【讨论】:

    猜你喜欢
    • 2014-03-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-12
    • 2013-08-24
    • 1970-01-01
    • 2018-02-16
    • 2014-09-10
    相关资源
    最近更新 更多