Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Please advice how to install the patch command on Ubuntu Linux

I download the following file , patch_2.6-2ubuntu1_amd64.deb ( from site - http://packages.ubuntu.com/lucid/patch )

But not clearly how to install it?

I tried by ./patch_2.6-2ubuntu1_amd64.deb , ( but I get errors )

Please advice how to install the pkg patch_2.6-2ubuntu1_amd64.deb In order to use thepatch command on my unbuntu linux

share|improve this question

".deb" files are not executable binaries. Use dpkg command to install your package :

dpkg -i your_package.deb
share|improve this answer

This website tells you that the package is in the repository. You should not download the package from the website to install it.

You should use your package manager :

sudo apt-get install patch
share|improve this answer
the problem is that I not connected to the network , I guess this will dowload the pkg from network – user58412 Apr 8 '14 at 19:58
@Eytan Yes it downloads the package (you can also use the install cd as repository, but I don't know what's on it). In that case use dpkg. – Leiaz Apr 8 '14 at 20:18

since your patch is tar.gz a simple way to install is to get alien

sudo apt-get install alien

then turn tar.gz into deb

sudo alien -k file.tar.gz
share|improve this answer
"since your patch is tar.gz" why do get information? The OP clearly indicates a downloaded a .deb file of the patch command. – Anthon Nov 22 '14 at 11:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.