Overclock.net › Forums › Overclock.net Forum › FAQs › Info: What is this APT thing in Ubuntu, and how do I use it?
New Posts  All Forums:Forum Nav:

Info: What is this APT thing in Ubuntu, and how do I use it?

post #1 of 5
Thread Starter 
First off, this is the sister thread for YUM, which is basicly the same as APT, only on Fedora. Check it out here: http://www.overclock.net/showthread.php?t=26076

Secondly, only use this guide if you are A: Willing to ask for help if you don't understand, and B: Know how to get a Linux terminal.

The title says Ubutnu, but this FAQ will also work on Kubuntu and EduBuntu, with the exact commands I give you. Versions for Slackware/Debian/Gentoo are in the works.

Now, for the good part.

When using APT, you must first know what it is. APT stands for Advanced Package Tool. Hopefully you already know that a package is the most common file used to distrubuite software on Linux systems. Packages are .DEB files on Debian-based systems like Ubuntu, and .RPM files on RedHat based systems like Fedora. What APT does is find, download, and install packages. So, with that knowlage, here are some example commands:

Code:

sudo apt-get install xmms 

What I just did is tell the program to run as a root user (sudo), and install the program XMMS (X Multimedia System). Now, sometimes APT will give you an error that some dependincies have not been met. What this means is that some of the files needed to install what you want are missing. To fix this, type:
Code:

sudo apt-get build-dep packagename 

Substitute "packagename" with the name of your program, and APT will download and install all files the you need to install whatever you want to run.

Every once in a while (every week or so), it is a good idea to update APT's list of avalibale software. To do this, type:
Code:

sudo apt-get update 

That will connect to all the servers listed in your APT configuration file and download new lists of software from each.

To update a piece of software that is on your system, you would type:
Code:

sudo apt-get update packagename 

Once again, substitute "packagename" for what you want to update.

It's always a good idea to enable extra repositories, and just follow the instructions at www.ubuntuguide.org to do that, it's mostly self-explanitory. Doing so will give you access to new servers, and thus, more software. After enabling the extra servers, run:
Code:

sudo apt-get update 

to add the new things to the master list.

Finaly, there is a graphical frontend for APT, called Synaptic. It basicly is a User Interface for APT, and does everything the command line version does, just not quite as fast or easy. I like to use Synaptic o search for a package, and then download it with APT.

That about sums it up, but just remember that thisis a beginers guide to the basic functions of APT. It can do so much that we didn't enev hit on here, so stay tuned for another FAQ in the future. Let me know if you have and problems/questions,

-Chipp
morpheus
(16 items)
 
smith
(6 items)
 
For Sale: For Sale: Shure X2u XLR to USB Interface
$75 (USD) or best offer
CPUMotherboardGraphicsRAM
Core i5 2400 GIGABYTE GA-H67MA-UD2H-B3 XFX Radeon 7850 Double D G.Skill Ripjaw X 
Hard DriveHard DriveCoolingOS
OCZ Vertex 3 Western Digital 640gb AAKS Zalman VF900 Windows 7 Ultimate x64 
MonitorKeyboardPowerCase
Dell P2210H OCN Ducky 9004 FSP Group FSP450-60GHS(85)-R InWin Dragon Slayer mATX 
MouseAudio
Logitech G5 Digidesign MBox 2 
CPUMotherboardGraphicsHard Drive
i5-3210m Lenovo X230 Intel HD 4000 Samsung SSD 
OSMonitor
Windows 7 12.5" IPS LED Backlit Panel, 1366x768 
  hide details  
Reply
morpheus
(16 items)
 
smith
(6 items)
 
For Sale: For Sale: Shure X2u XLR to USB Interface
$75 (USD) or best offer
CPUMotherboardGraphicsRAM
Core i5 2400 GIGABYTE GA-H67MA-UD2H-B3 XFX Radeon 7850 Double D G.Skill Ripjaw X 
Hard DriveHard DriveCoolingOS
OCZ Vertex 3 Western Digital 640gb AAKS Zalman VF900 Windows 7 Ultimate x64 
MonitorKeyboardPowerCase
Dell P2210H OCN Ducky 9004 FSP Group FSP450-60GHS(85)-R InWin Dragon Slayer mATX 
MouseAudio
Logitech G5 Digidesign MBox 2 
CPUMotherboardGraphicsHard Drive
i5-3210m Lenovo X230 Intel HD 4000 Samsung SSD 
OSMonitor
Windows 7 12.5" IPS LED Backlit Panel, 1366x768 
  hide details  
Reply
post #2 of 5
Dude--I am still lost in LInuxland--I can't even figure out how to install RPM files in Mandriva 10.1--I really appreciate the technical depth of this FAQ--too bad I still am clueless--not your fault however...
Shop Dog
(13 items)
 
 
CPUMotherboardGraphicsRAM
E8400 Asus Blitz Formula SE HD3870X2 G Skill 2 x 2GB DDR2 800 
Hard DriveOptical DriveOSMonitor
Velociraptor 150GB LG DVD Burner Vista Ultimate 64 AOC 21.5" LED 1080p 
KeyboardPowerCaseMouse
Deck Legend Silverstone 750 Modular OverClock Edition Lian Li V1100 Logitech Trackball 
Mouse Pad
Nope 
  hide details  
Reply
Shop Dog
(13 items)
 
 
CPUMotherboardGraphicsRAM
E8400 Asus Blitz Formula SE HD3870X2 G Skill 2 x 2GB DDR2 800 
Hard DriveOptical DriveOSMonitor
Velociraptor 150GB LG DVD Burner Vista Ultimate 64 AOC 21.5" LED 1080p 
KeyboardPowerCaseMouse
Deck Legend Silverstone 750 Modular OverClock Edition Lian Li V1100 Logitech Trackball 
Mouse Pad
Nope 
  hide details  
Reply
post #3 of 5
I always find easier to use the Synaptic Package Manager than the apt command.

Anyway, the apt command has other uses. Here are two more:

1. Adding a new CDROM:
apt-cdrom (options) (commands) without parentesis
options: -
-a do a package scan. May be needed with older Debian cdroms
-h help
-m do not mount
-n check everything, but make no changes
-r rename

commands:
add add a cdrom to the source list
ident prints the identity of the current cd rom and the stores filename.

2. Cleaning installation files:
apt-get autoclean (this is for files that cannot be downloaded anymore)
apt-get clean (this clean the local repository of retieved package files)

Hope this complete the apt command list a bit.
Back on Intel
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q6600 B3 DFI Lan Party P35 UT TR2 8800GTS 320Mb 4x1Gb Corsair Dominator DDR2 
Hard DriveOptical DriveOSMonitor
70Gb Raptor + 200Gb Raid 0+1 LiteOn DVD-ROM Vista Home Premium 64 Gateway FPD2275W 
KeyboardPowerCaseMouse
MS Internet Keyboard USB P&PC Turbo Cool 1kW Tt Kandalf MS Marblemouse 
  hide details  
Reply
Back on Intel
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q6600 B3 DFI Lan Party P35 UT TR2 8800GTS 320Mb 4x1Gb Corsair Dominator DDR2 
Hard DriveOptical DriveOSMonitor
70Gb Raptor + 200Gb Raid 0+1 LiteOn DVD-ROM Vista Home Premium 64 Gateway FPD2275W 
KeyboardPowerCaseMouse
MS Internet Keyboard USB P&PC Turbo Cool 1kW Tt Kandalf MS Marblemouse 
  hide details  
Reply
post #4 of 5
Quote:
Originally Posted by CyberDruid
Dude--I am still lost in LInuxland--I can't even figure out how to install RPM files in Mandriva 10.1--I really appreciate the technical depth of this FAQ--too bad I still am clueless--not your fault however...
Too bad I couldnt have posted this long ago..., but you are using a RPM based distribution. Apt is for distributions like debian, ubuntu, etc.... You might find them easier, I prefer them anyway (I have come to hate .rpm!).

Keep with it and you will be there in no time.
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
E4400 P35 DS3R 8800GTS 2GB Crucial Ballistix 
Hard DriveOptical DriveOSMonitor
1x SATA 80GB, 160GB Hitachi - 1x 120GB Samsung IDE DVDRW Fedora 7 and Windows XP ViewSonic VX922 2ms 19in 
KeyboardPowerCaseMouse
basic 520W Corsair Thermaltake VB1000WWS Logitech G5 
  hide details  
Reply
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
E4400 P35 DS3R 8800GTS 2GB Crucial Ballistix 
Hard DriveOptical DriveOSMonitor
1x SATA 80GB, 160GB Hitachi - 1x 120GB Samsung IDE DVDRW Fedora 7 and Windows XP ViewSonic VX922 2ms 19in 
KeyboardPowerCaseMouse
basic 520W Corsair Thermaltake VB1000WWS Logitech G5 
  hide details  
Reply
post #5 of 5
there is also yet another good apt command that i think should be listed and that is


apt-get dist-upgrade

this will search the repositorys and upgrade your system.. i find it best to use

apt-get update
apt-get dist-upgrade

of course you will want to tack on sudo infront of those
    
CPUMotherboardGraphicsRAM
Intel I7 2600k Asus p8p67-Deluxe Evga GTX 460 SuperClocked EE G-skill Ripjaws 1866 
Hard DriveHard DriveOptical DriveCooling
Samsung 830 64GB Western Digital 1TB Black Lite On 20x DVD RW XSPC RayStorm + 360Extreme Rad 
OSOSOSMonitor
Gentoo x86_64 3.1.6 Windows 7 Profession x64 WindowsRE I-INC IH282 
KeyboardPowerCaseMouse
ThermalTake Meka G1 Ultra x3 1000w Xigmatek Elysium Logitec G500 Gaming Mouse 
Mouse PadAudio
Ultra Pad Dennon Digital Receiver 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Intel I7 2600k Asus p8p67-Deluxe Evga GTX 460 SuperClocked EE G-skill Ripjaws 1866 
Hard DriveHard DriveOptical DriveCooling
Samsung 830 64GB Western Digital 1TB Black Lite On 20x DVD RW XSPC RayStorm + 360Extreme Rad 
OSOSOSMonitor
Gentoo x86_64 3.1.6 Windows 7 Profession x64 WindowsRE I-INC IH282 
KeyboardPowerCaseMouse
ThermalTake Meka G1 Ultra x3 1000w Xigmatek Elysium Logitec G500 Gaming Mouse 
Mouse PadAudio
Ultra Pad Dennon Digital Receiver 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: FAQs
Overclock.net › Forums › Overclock.net Forum › FAQs › Info: What is this APT thing in Ubuntu, and how do I use it?