POSIX是什么?我读过维基百科上的文章,每次遇到这个词我都会去读。事实上,我从来没有真正理解它是什么。

有没有人可以通过解释“POSIX的需求”来解释给我听?


当前回答

另一方面,POSIX代表“可移植操作系统接口”,POSIX是一组定义操作系统和应用软件之间接口的标准。POSIX类似于UNIX标准,它旨在确保为一个POSIX兼容的操作系统编写的软件可以在其他POSIX兼容的操作系统上运行而无需修改。

POSIX标准定义了一组在基于unix的操作系统中常见的系统调用、库和实用程序。

许多操作系统,包括Linux、BSD和macOS,都是POSIX兼容的,这意味着它们满足POSIX标准中定义的要求。

其他回答

另一方面,POSIX代表“可移植操作系统接口”,POSIX是一组定义操作系统和应用软件之间接口的标准。POSIX类似于UNIX标准,它旨在确保为一个POSIX兼容的操作系统编写的软件可以在其他POSIX兼容的操作系统上运行而无需修改。

POSIX标准定义了一组在基于unix的操作系统中常见的系统调用、库和实用程序。

许多操作系统,包括Linux、BSD和macOS,都是POSIX兼容的,这意味着它们满足POSIX标准中定义的要求。

POSIX是IEEE指定的一系列标准,用于阐明和统一Unix-y操作系统提供的应用程序编程接口(以及辅助问题,如命令行shell实用程序)。

当您编写依赖POSIX标准的程序时,您可以相当肯定地将它们轻松地移植到大量的Unix衍生产品中(包括Linux,但不限于它!);如果你使用的某些Linux API不是Posix的一部分,那么将来你想要将该程序或库移植到其他unix系统(例如MacOSX)时,你将会遇到困难。

POSIX是IEEE和开放组织提出的一组标准,描述了理想的Unix如何运行。程序员、用户和管理员都可以熟悉POSIX文档,并期望POSIX投诉Unix提供所有提到的标准功能。

由于每个Unix的工作方式都略有不同——Solaris、Mac OS X、IRIX、BSD和Linux都有自己的怪癖——POSIX对业内人士特别有用,因为它定义了一个标准的操作环境。例如,C库中的大多数函数都基于POSIX;因此,程序员可以在他的应用程序中使用一个,并期望它在大多数unix中表现相同。

然而,Unix的不同领域通常是重点,而不是标准领域。

POSIX的伟大之处在于,欢迎您自己阅读:

开放组基础规范第7期

第7版被称为POSIX.1-2008,其中有新的东西——但是,POSIX.1的Google-fu等将允许您看到Unix背后的整个历史。

In 1985, individuals from companies throughout the computer industry joined together to develop the POSIX (Portable Operating System Interface for Computer Environments) standard, which is based largely on the UNIX System V Interface Definition (SVID) and other earlier standardization efforts. These efforts were spurred by the U.S. government, which needed a standard computing environment to minimize its training and procurement costs. Released in 1988, POSIX is a group of IEEE standards that define the API, shell, and utility interfaces for an operating system. Although aimed at UNIX-like systems, the standards can apply to any compatible operating system. Now that these stan- dards have gained acceptance, software developers are able to develop applications that run on all conforming versions of UNIX, Linux, and other operating systems.

摘自《Linux实用指南》

Posix governs interoperability, portability, and in other areas such as the usage and mechanism of fork, permissions and filesystem standards such as /etc, /var, /usr and so on . Hence, when developers write a program under a Posix compliant system such as for example Linux, it is generally, not always, guaranteed to run on another posix compliant system such as IBM's AIX system or other commercial variants of Unix. Posix is a good thing to have as such it eases the software development for maximum portability which it strives for. Hope this answer makes sense.

感谢Jed Smith和Tinkertim指出我的错误——我的错!!:(