TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Linuxify – Transform the MacOS CLI into a GNU/Linux CLI Experience

30 点作者 fabiomaia超过 6 年前

6 条评论

danieldk超过 6 年前
I use Nix[1] as my package manager on macOS with home-manager[2]. Since Nix puts nix paths before OS paths and doesn&#x27;t prefix GNU commands with &#x27;g&#x27;, I just install <i>coreutils</i> and others:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;danieldk&#x2F;nix-home&#x2F;blob&#x2F;a7ddc5acf260552f737700795252905ca64f4214&#x2F;machines&#x2F;macbook.nix#L20" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;danieldk&#x2F;nix-home&#x2F;blob&#x2F;a7ddc5acf260552f73...</a><p>The nice thing is that the system state is never mutated, you can just remove these lines from the configuration, run <i>home-manager switch</i> and you are back to the standard macOS userland.<p>You could also only use GNU userland in specific projects by putting a <i>default.nix</i> file in the project&#x27;s directory and using dirvenv. <i>cd</i> to <i>myproject</i> and you have a GNU userland, <i>cd</i> out of <i>myproject</i> and you are back to the macOS userland.<p>[1] <a href="https:&#x2F;&#x2F;nixos.org&#x2F;nix&#x2F;" rel="nofollow">https:&#x2F;&#x2F;nixos.org&#x2F;nix&#x2F;</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;rycee&#x2F;home-manager" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rycee&#x2F;home-manager</a>
noobermin超过 6 年前
One of the things I suppose I still couldn&#x27;t get used to was just how BSD-ish[0] tools differ from GNU tools. One of the things that drove me mad was having forgotten a switch and having to move back to the beginning of the line to add it again. Perhaps it was just me learning to be sloppy with GNU userland but it was hard and it&#x27;d always be a fresh breath of air to use Linux again.<p>Moreover, when things break, it&#x27;s easy to fix. When things break on Mac, it&#x27;s a black box. Trying to find help online is also equally frustrating. Getting help for linux issues is usually easy and informative, for example, forum posts and answers on stackoverflow-likes are detailed and generally explanatory, in which it seems like the intent is for both the askee and answerer are looking for &quot;why&quot; and not just &quot;what&quot;. MacOS answers are always &quot;copy and paste this&quot; and half of them are obviously just plug and play or have bits that have accrued like gibberish extras in a game of telephone. Even blogposts are like this!<p>[0] I assume it&#x27;s BSD-ish, but I wouldn&#x27;t know because I&#x27;ve never used it. Moreover, openssh&#x27;s tools act like this which catch me from time to time.
评论 #17943614 未加载
评论 #17943649 未加载
评论 #17943749 未加载
joshuamcginnis超过 6 年前
Alternatively, provide a Brewfile (`brew bundle dump`) and let users edit and install (`brew bundle`) themselves.
评论 #17943453 未加载
otherflavors超过 6 年前
They lost me at &quot; replacing pre-installed BSD programs...&quot;
评论 #17943129 未加载
评论 #17943948 未加载
评论 #17943202 未加载
评论 #17943116 未加载
评论 #17943794 未加载
mschuster91超过 6 年前
@OP I&#x27;d suggest mentioning the Homebrew dependency or automatically using macports if available. IIRC all the packages you install from brew are also working in macports.
zuttton超过 6 年前
For people to rich to afford just installing linux..