Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shinokada/macgnu
Transform the macOS CLI into a fresh GNU/Linux CLI experience by installing missing GNU programs, updating outdated GNU programs, replacing pre-installed BSD programs with their preferred GNU implementation.
https://github.com/shinokada/macgnu
gnu macos zsh
Last synced: about 1 month ago
JSON representation
Transform the macOS CLI into a fresh GNU/Linux CLI experience by installing missing GNU programs, updating outdated GNU programs, replacing pre-installed BSD programs with their preferred GNU implementation.
- Host: GitHub
- URL: https://github.com/shinokada/macgnu
- Owner: shinokada
- License: mit
- Created: 2021-03-03T08:05:39.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-19T05:28:58.000Z (9 months ago)
- Last Synced: 2024-05-01T19:49:27.639Z (8 months ago)
- Topics: gnu, macos, zsh
- Language: CSS
- Homepage: https://macgnu.codewithshin.com/
- Size: 85.9 KB
- Stars: 10
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
MacGNU
Macgnu is a [linuxify](https://github.com/fabiomaia/linuxify) alternative.
If you want to linuxify your macOS core commands, but you may not want to install `libressl, file-formula, git, openssh, perl, python, rsync, unzip, vim` because you have already installed them. Then this is for you.
The macgnu is built on [linuxify](https://github.com/fabiomaia/linuxify):
Transform the macOS CLI into a fresh GNU/Linux CLI experience by
- installing missing GNU programs
- updating outdated GNU programs
- replacing pre-installed BSD programs with their preferred GNU implementationMacgnu :
- won't install `libressl, file-formula, git, openssh, perl, python, rsync, unzip, vim`
- won't ask if you want to change your shell to the latest bash.## Installing MacGNU with Awesome package manager
After installing [Awesome package manager](https://github.com/shinokada/awesome):
```sh
awesome install shinokada/macgnu
```## Install GNUs
```bash
macgnu install
```After installation, create `~/.macgnu` and copy [.macgnu](https://github.com/shinokada/macgnu/blob/main/.macgnu).
Add following to your terminal configuration `~/.zshrc` or `~/.bashrc`
```zsh
# ~/.zshrc
. ~/.macgnu
``````bash
# ~/.bashrc
. ~/.macgnu
```If you are using iTerm you may need to add following to `~/.bash_profile`:
```bash
. ~/.bashrc
```## Uninstalling GNUs
```sh
macgnu uninstall
```Remove the following from `~/.zshrc` and `~/.bashrc`.
```zsh
. ~/.macgnu
```## How to change to bash
You may want to change from ZSH to Bash and vice versa:
```terminal
# from ZSH to Bash
$ which -a bash
/usr/local/bin/bash
/bin/bash
$ chsh -s /usr/local/bin/bash
Changing shell for shinokada.
Password for shinokada:
# Open a new tab or restart your terminal
$ which bash
/usr/local/bin/bash
``````terminal
# from Bash to ZSH
$ which -a zsh
/bin/zsh
$ chsh -s /bin/zsh
Changing shell for shinokada.
Password for shinokada:
# Open a new tab or restart your terminal
```## List of packages installed
### GNU programs non-existing in macOS
- tree
- watch
- wget
- wdiff
- autoconf### GNU programs whose BSD counterpart is installed in macOS
- coreutils
- binutils
- diffutils
- ed
- findutils
- gawk
- gnu-indent
- gnu-sed
- gnu-tar
- gnu-which
- grep
- gzip
- screen### GNU programs existing in macOS which are outdated
- bash
- emacs
- gpatch
- less
- m4
- make
- nano
- bison### BSD programs existing in macOS which are outdated
- flex
## License
MIT License
Copyright (c) 2021 Shinichi Okada
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.