Linux : busybox,dpkg,apt-get,apt

I have discussed this blog  at  APT-GET  in detail. Please SUBSCRIBE Free Embedkari for many interesting technical topics.

I discussed about native debugging with gdb in  last blog post.   I strongly recommend you to read earlier blogs for better understanding . If you find something missing, Please provide feedback in comment box so that I can take corrective action.

Key TakeAway : Concept of Busybox, dpkg,apt-get,apt-cache.apt-mark,apt

Busybox : The Swiss Army Knife of Embedded Linux 

It combines many small optimized utilities into a single binary. You may find it in normal desktop linux /bin folder but there are separate binaries for ls,cat,cp  etc . However , in Embedded Linux, you may find all these utilities linked to this single busybox binary .

Let me show you one common use case from a home router using telnet.

Step 1: Telnet should be disabled by default for network security. I have enabled it using GUI for testing purpose and simply removed the external internet  cable for security.


Step 2: Start a telnet session to router IP using putty


Step 3: Login using admin credentials and check the implementation of different linux binaries. These are linked to busybox (ls /bin -lart —->busybox)


step 4: Double check  the system OS and target

admin@RT-AC51U:/# uname -a

Linux RT-AC51U 2.6.36 #1 Fri Aug 17 16:42:51 CST 2018 mips GNU/Linux

admin@RT-AC51U:/# cat /proc/cpuinfo

system type : MT7620

processor : 0

cpu model : MIPS 24Kc V5.0

BogoMIPS : 386.04

wait instruction : yes

microsecond timers : yes

tlb_entries : 32

extra interrupt vector : yes

hardware watchpoint : yes, count: 4, address/irw mask: [0x0000, 0x03f8, 0x0fe0, 0x0bf8]

ASEs implemented : mips16 dsp

shadow register sets : 1

core : 0

VCED exceptions : not available

VCEI exceptions : not available

Software Package Management

Software packages for Linux distributions are based on different package formats such as deb(Debian,Ubuntu,Kali Linux), rpm(Red Hat,Fedora) etc. Hence different package installers such as apt,yum etc are available. Let me take the case of Ubuntu

Debian Package or dpkg

dpkg is the low-level package installer for Debian based operating systems such as Ubuntu, Kali Linux  etc. The file format used is deb

dpkg -l  //List of all installed packages

dpkg –help

Please note that dpkg will not check the dependency,install or configure automatically. There is a provision of another high level package manager for this purpose. These high level package managers apt* use dpkg for installation purpose

Advance Packaging Tool apt-get , apt-cache, apt
  • The apt-get utility is used for managing all software packaging requirements i.e. Installing/Removing/Updating software packages or Operating System itself. This check the package dependency and do necessary installation & configuration.
    • sudo apt-get update
    • sudo apt-get install
    • sudo apt-get upgrade
    • sudo apt-get remove — purge tftpd
    • purge option to remove configuration as well
  • The apt-cache utility to search packages in apt’s cache
    • apt-cache pkgnames
    • apt-cache search tftpd
  • The latest apt utility consists of all important commands from apt-get and apt-cache. So this should be used
    • apt list
    • apt show tftpd
    • apt –help
    • sudo apt edit-sources
  • apt-mark can be utilized to mark packages auto,manual,hold etc
    • apt-mark showmanual  

updating this article to point different learning concepts . Appreciate any feedback to improve.

You may find some interesting topic below :

How to choose sensor, processing device and network for IoT ?

How device driver is related to Operating System ?

How to setup serial port in virtual box ? 

How to Learn Linux Device driver coding ? 

How to Learn C  practically ? 

How I can practice AVR, ARM, Linux and other Embedded Questions for Interview ? 

How Computer Vision is  impacting Processor Road MAP ? 

How can I start learning RISC-V without purchasing development board ?

How RISC architecture differs in simple and advanced embedded processors ? 

How to do web scraping with Python ? 

You may  find list of all interesting topics at HowTo

Machine Learning Basics

Hello folks,    Greetings of the day!!! Whenever we see machine learning or we hear about machine learning, it seems like

Continue reading


STM32 Clock Configuration

I discussed about basic hardware sanity, check in   (Click to check it out) In this new session, i’m discussing

Continue reading


Learn C Programming Practically

This article provides guidelines to Learn C with practical approach. If someone spend a day to go through these videos

Continue reading


Importance of using LED

This article is in continuation of  . This explains what is the significance of blinking LED in Embedded System. Hello

Continue reading


ARM bare-metal programming @STM32

This article has reference to recent ARM programming videos posted in Youtube. We discussed about   . This covers explanation

Continue reading


Fault Model based Validation for board HW and Post Silicon Validation

Time to market with excellent quality product is key to any business. It requires both efficient man power and  tools

Continue reading



Here are Links  to various Youtube videos/articles. Just click on the topic of your interest.  We will keep updating this

Continue reading


How do I apply for off-campus placements?

Most students, particularly in India, rely heavily on the campus placements. They don’t know that they can reach out to

Continue reading


How to Learn to make Machine Learning

Why One Should Learn ML ? Machine Learning as a domain is currently the hottest domain in the market. Big

Continue reading


SPI Driver

This is in continuation of my last article on . Today I will take you through actual SPI driver code

Continue reading


I am trying to improve usability of my  site.If you find something missing, Any feedback in comment box will help to  take corrective action.  Please subscribe to YouTube channel Embedkari  for additional embedded related stuff.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.