Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the terminal tips and tips for macOS and HomeBrew

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces "what are the terminal tips and skills of macOS and HomeBrew". In daily operation, I believe many people have doubts about the terminal tips and skills of macOS and HomeBrew. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the questions of "what are the terminal tips and skills of macOS and HomeBrew?" Next, please follow the editor to study!

Homebrew

Homebrew is an open source package manager for macOS. It is well known that macOS lacks a package manager, which Homebrew is written in the Ruby programming language.

Package managers are important because packages become heavily interdependent when developers connect their applications with pipes, iUnix redirects, or scripts. Using the package manager, you can save yourself the hassle of checking system compatibility and dependencies, and it becomes very easy to install applications.

Install Homebrew

Now that you know what Homebrew is, start installing it.

The way to quickly open a terminal is to use cmd + space, then type the terminal, press enter, and it will pop up.

To install Homebrew, you must first install the Xcode tool, or you can choose to install the full version of Xcode.

Install Xcode tools:

$xcode-select-install

Install homebrew:

$ruby-e "$(curl-fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)

Some homebrew commands:

Brew-version display version

Brew help print help information

Brew doctor check problem

1. Cask

Cask provides a simple and fast way to install and manage GUI applications on macOS. Simply put, it is a way to install applications on Mac, and you can install applications on Mac without having to search and install online.

Installation:

$brew install cask

Description:

List applications: brew search

Search app: brew search (app_name)

Installation: brew cask install (app_name)

Update: brew cask upgrade

Help: brew cask help

Cask: https://github.com/Homebrew/homebrew-cask

2. Youtube-dl

Youtube-dl is a command line program for downloading YouTube videos or videos from any platform at high resolution.

Installation:

$brew install youtube-dl

Description:

Install ffmpeg:brew install youtube-dl ffmpeg

Download highest-res:youtube-dl-f bestvideo+bestaudio 'link'

Help: youtube-dl-help

Youtube-dl: https://github.com/ytdl-org/youtube-dl

3. Speedtest

Speedtest-cli is a command line interface for testing internet bandwidth. It allows you to test specific servers and even provides a URL that allows you to show off your Internet speed to your friends.

Installation:

$brew install speedtest-cli

Run: speedtest-cli

Speedtest: https://github.com/sivel/speedtest-cli

4. Imagemagick

Imagemagick is a versatile tool that can be used to convert one image format to another (for example, JPEG to PNG). It can also be used to add borders, effects, and resize. Browse more and use convert help

Installation:

$brew install imagemagick

Description:

Add a border (example): convert testing.png-border 1x1-bordercolor black result.png

Add effect (sample): convert testing.png-charcoal 2 example.png

Resize (sample): convert testing.png-resize 1920 (or x1080) example.png

Help: convert help

Imagemagick: https://imagemagick.org/index.php

5. Mas

Mas is the command line interface of Mac App Store, which allows you to install Mac applications directly from App Store from the command line. You can search for applications, install all existing updates, print the version number of the application in the store, and so on. There is even an interesting option called "Lucky", which will install the first search results if you dare to try.

Installation:

$brew install mas

Description:

List all APP:mas list

Search APP:mas search Xcode

Install APP:mas install 497799835 (version number of the application)

Application to be updated: mas outdated

Update APP:mas upgrade

Mas: https://github.com/mas-cli/mas

6. Wifi-password

The function of wifi-password is exactly the same as the name, that is, to display the Wi-Fi password of the network you are currently connected to. After entering keychain authentication, the password is displayed in bright green.

Installation:

$brew install wifi-password

Run: wifi-password

7. Midnight-commander

Midnight-commander is a tool that combines finder and command line functions to create an interactive file manager in the terminal. Within Midnight-commander, you can browse your directory structure using clicks or arrows on the keyboard.

Installation:

$brew install midnight-commander

Run: mc

Midnight-commander: https://midnight-commander.org/

8. Zsh

Zsh, also known as Z shell, is a shell of Unix with attractive colors. It is used as an interactive login shell and command interpreter for shell scripts. Learn more about its use on GitHub.

Installation:

$brew install zsh

Set Zsh as the default shell:chsh-s / bin/zsh

Zsh: https://www.zsh.org/

9. Htop

Htop is Unix's interactive system monitor, process viewer and process manager, and is said to be the successor to the Unix program top. It displays an updated list of running processes on the Mac, sorted by CPU usage.

Installation:

$brew install htop

Run: sudo htop

Htop: https://hisham.hm/htop/

10. Tree

Tree is a tool that lists the contents of directories in folders in a tree format. For those who want to quickly and intuitively show the file structure of the project, his move is a savior.

Installation:

$brew install tree

Run: tree

Tree: http://mama.indstate.edu/users/ice/tree/

11. Archey

Archey a displays system information in the terminal, as well as a text-based retro-style Apple icon.

Installation:

$brew install archey

Description:

Run: archey

Color: archey-c

Black and white: archey-b

Archey: https://obihann.github.io/archey-osx/

12. Trashtrash trash can is a simple program that moves files or folders to the trash can.

Installation:

$brew install trash

Description:

Run: trash [- vlesyF]

[...]

Help: trash-help

Trash: https://hasseg.org/trash/

At this point, the study of "what are the terminal tips and skills of macOS and HomeBrew" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report