Wednesday, January 15, 2025
HomeProgrammingHow can I set up a Bash alias on macOS?

How can I set up a Bash alias on macOS?

To create a Bash alias on macOS, follow these steps:

1. Open the Terminal app.

2. Type nano ~/.bash_profile to edit the profile file.

3. Add your alias at the end of the file, using the syntax:
alias =’‘ (e.g., alias ll=’ls -l’).

See also  How to center a button in CSS

4. Press Ctrl + O to save and Ctrl + X to exit.

5. To apply the changes, run source ~/.bash_profile.

Now, you can use the alias in the Terminal instead of typing the full command. Repeat this process for additional aliases.

RELATED ARTICLES
0 0 votes
Article Rating

Leave a Reply

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
- Advertisment -

Most Popular

Recent Comments

0
Would love your thoughts, please comment.x
()
x