At installation, all Macs contain a wide variety of Terminal commands. However, as you get more experience with Terminal (or if you’re joining us from Linux), you might soon find that some important commands are missing. Where’s wget, for example, or nmap? If you need those commands, you can easily add them to the macOS Terminal with a package manager. A package manager is an application that handles downloading, installing, and upgrading a set of software tools. In this case, our package manager will be responsible for downloading and installing the different Terminal commands that we want to use.
If you’re a Linux user, you’ll recognize this functionally from apt-get or yum. /usr /bin /ruby -e ' $(curl -fsSL This command will run a Ruby script that downloads the Homebrew package manager from GitHub.
Install - Installing.pkg with terminal? - Ask /usr/sbin/installer. The installer command is used to install Mac OS X installer packages to a specified domain or volume. The installer command installs a single package per invocation, which is specified with the -package parameter. When writing commands and paths in Terminal, almost everything is case sensitive: This means that you need to remember to properly capitalize 'Dock' when referring to the Dock, or OS X won't understand your command. What's a path? You can use Terminal to get direct access to your files without using the Finder.
When prompted, press Enter to continue the installation. Enter your administrator password when prompted. When the application is finished installing, you’ll be returned to the command prompt.
From here, you can view Homebrew’s documentation by typing the brew help command, or you can proceed to the next step. Searching for Packages To find programs and commands to download, you’ll first need to search Homebrew’s database for the program you want. For this example, we’ll search for wget.
Wget is a popular Linux command that downloads files from HTTP and FTP servers. Type the following command and press Enter. Brew install wget 2. Homebrew will now start to work its package-managing magic.
In addition to wget, I can see that it also installed openssl, which is considered a dependency for wget. When the installation is complete, I’ll be returned to the command prompt. Using new commands Now that we’ve installed the wget command, we’ll be able to use it just like any other Terminal command.
For example, if we type man wget, we’ll see the man page for wget, just as expected. And we can use wget just as we would on Linux. For example, to download a zip file from a website, we’d use a command like the one below.
Comments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |