Mac ll, L, LA, and other shorthand commands cannot be used

Source: Internet
Author: User
Tags aliases

Mac defaults to UNIX systems, and the UNIX system itself does not have these shorthand commands, so you can use them by setting aliases for the commands

View all command aliases that have been set on this computer: alias

Set command alias: Alias Ll= ' Ls-alf '

The execution command is valid only in the current shell, and can be set in the user's. Bash_profile for long-term use, so that each login can be used with these shorthand commands.

Steps:

1.vim ~/.bash_profile

2. Write the following to the file and save

Alias Ll= ' Ls-alf '

Alias La= ' Ls-a '

Alias l= ' LS-CF '

3. Effective immediately this file: source ~/.bash_profile.

The relevant bash profile describes:

/etc/profile: This file sets the environment information for each user of the system, and the file is executed when the user logs on for the first time.
and collect the shell settings from the configuration file of the/ETC/PROFILE.D directory.
/ETC/BASHRC: Executes this file for each user running the bash shell. When the bash shell is opened, the file is read.
~/.bash_profile: Each user can use this file to enter shell information dedicated to their own use, when the user logs on, the
The file is only executed once! By default, he sets some environment variables to execute the user's. bashrc file.
~/.BASHRC: This file contains bash information dedicated to your bash shell, and when you log in and each time you open a new shell, the
The file is read.
~/.bash_logout: Executes the file each time it exits the system (exiting the bash shell).

Mac ll, L, LA, and other shorthand commands cannot be used

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.