Linux Ubuntu中的/etc/apache2和/usr/sbin/apache2有什么区别?

Linux Ubuntu中的/etc/apache2和/usr/sbin/apache2有什么区别?,linux,ubuntu,apache2,Linux,Ubuntu,Apache2,我想知道/usr/sbin/apache2和/etc/apache2之间到底有什么区别。我的想法是,/etc包含所有已安装的软件包和必要的配置文件,但我遇到的问题是/usr/sbin/apache2。有人能帮我吗?通常目录和其中的文件都有一定的含义:- /etc - directory is for storing the configuration files. /usr - /usr/bin - user's executable binary files - /usr/sbin

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

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

/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相关文件都是其配置文件。希望能有所帮助。

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