Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
需要一些帮助
感谢您的建议
我假设这是Linux(或类似的)。
主目录的路径可以在HOME环境变量中找到,您可以使用getenv(3).
HOME
getenv(3)