Understanding the GET Linux Command

There's no such command as 'get'—but a few alternatives come close

Linux from a shell session offers hundreds of unique commands to perform various administrative functions or to invoke programs and system utilities. Many of those commands model elegant simplicity in how they're named. Yet, although get is a simple-enough term, no Linux command actually maps to it.

The Linux-based information we provide references shell sessions only, and therefore applies to all distributions.

Common 'get' Alternatives

People looking for get in a generic sense usually mean one of two things—either obtaining remote content or updating software on a Debian-based system running the Advanced Package Tool package-management system.

Obtaining Content

The wget command downloads remote assets (like files) or even entire web pages from a web server. That little w is the tricky part; wget stands for World Wide Web get and the w isn't optional. It's a play on the fact that one of the standard behind-the-scenes commands to initiate web-content transfers is the http get statement.

Speaking of http get—it's a command string passed by browsers to servers. Normal people accessing the internet never directly execute HTTP commands, not even from a shell-based browser like Lynx.

Updating Software

Distributions like Debian and its variants, including Ubuntu, use the Advanced Package Tool system for managing software and software libraries. Although APT supports several different end-user interfaces, both from the desktop environment and from a shell session, one of the most common shell-based commands is apt-get. For example, on a Ubuntu system, to synchronize your computer's software libraries to remote repositories, to identify potential upgrade opportunities, you'd execute:

sudo apt-get update

The interplay between apt and apt-get is subtle. Many introductory-level "how to manage software on Linux" tutorials rely on apt-get without clearly communicating that apt-get is a single, but different, command and not just a synonym for apt.

Using 'get' as an Alias

alias get

Because get isn't a reserved keyword within Linux, you're free to map it to a specific, longer command using the alias system.

For example, you could specify an alias to automatically sync Ubuntu's software repositories by mapping sudo apt-get update to get. In this context, get isn't a new command in its own right, but rather a shortcut to the longer version.

Was this page helpful?