1, first, I use the Iterm2 terminal. The method is: After the download to iterm2.com, copy to the Applications folder, you can.
2, second, the Mac LS is not GNU LS, the two are different, it seems that the open source world or Apple has a view of the OH.
3. Once again, use brew to install GNU Coreutils Package, Brew installs coreutils
4, note, after installation, if you want to use the GNU command, to add a ' g ' in front, such as LS command to use GLS
5, if you want to use the GNU command directly, you can modify the PATH environment variable, so write:
Path= "/usr/local/opt/coreutils/libexec/gnubin: $PATH"
You can use "LS--version" to see the LS command used before and after the change.
6, the GNU ls --color=auto
Command, in fact, according to two files to display color, /etc/DIR_COLORS
or ~/.dir_colors
, a system-level configuration file, a user-level profile. So, copy the corresponding files from Ubuntu, and it's OK.
7, my goal is, the terminal is Ubuntu, GUI is Apple's, hehe.
Using GNU's ls command in the MacBook Terminal