Using GNU's ls command in the MacBook Terminal

Source: Internet
Author: User
Tags macbook

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.