/ factorpad.com / tech / linux-essentials / apt-get-command.html
An ad-free and cookie-free website.
Beginner
Learn to manage software packages at the Linux command line.
Videos can also be accessed from the Linux Essentials Playlist on YouTube.
Linux apt-get Command Summary with Examples (3:42)
Our sixty-fifth word, or command to memorize is
apt-get
from our category
System.
apt-get
allows you to manage software
packages.
-options | description |
---|---|
--help |
Print help screen |
-d |
Download archives only |
-y |
Assumes yes to queries |
Recall from the last video on
dpkg
we kicked off a high-level
discussion on package management. Well here we'll focus on another
tool used to update software directly from Internet repositories.
Before we start, it helps to think of commands as mini programs and
most follow this structure:
command -option(s) argument(s)
.
The apt-get
command has
over 30 options and the argument is typically the
software package name. The command syntax here is two layers:
apt-get [-options] update
,
apt-get [-options] upgrade
,
apt-get [-options] install package name
.
Like most commands, help is available with double-dash
--help
. The
-d
option downloads archives only, and
-y
assumes 'yes' to all queries that
come to the user.
We'll keep it basic as these tasks are often left to administrators.
Make note, separate commands apply to two types of Linux
distributions, Debian-style is apt-get
,
here, and for Fedora it's yum
.
So why is apt-get
an important command?
Well, accessing online repositories is a vital task.
And now you know how to do that.
Okay, the best way to embed this in your memory is by typing in your own terminal window.
Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows.
Here we go. Let's keep it simple here and view the 15 different
commands run within apt-get
by
redirecting the apt-get --help
screen
to a file called video65.txt
.
And then last, let's view it in less
.
See, the 15, let's call them sub-commands.
update
retrieves the list of packages,
upgrade
is here,
install
I mentioned, but also
remove
,
clean
, and
download
.
Okay now you know how to use apt-get
.
And you know the syntax for commands, options and arguments.
One last tip about the apt-get
command. So next we'll cover an additional tool for Debian systems that
helps you find packages.
Okay, thanks for visiting today. I hope this was a helpful
introduction to the apt-get
command.
For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:
This series about high-level summaries. We walk through installations in other tutorials on our YouTube Channel. Connect so you don't lose this valuable resource.
dpkg
command,
hit Back.apt-cache
command, click Next./ factorpad.com / tech / linux-essentials / apt-get-command.html
A newly-updated free resource. Connect and refer a friend today.