use -get to download a file Use apt-get to download a file. Completing the CAPTCHA proves you are a human and gives you temporary access to the web property. What can I do to prevent this in the future? If you are on a personal connection, like at home, you can run an anti-virus scan on your device to make sure it is not infected with malware. If you are at an office or shared network, you can ask the network administrator to run a scan across the network looking for misconfigured or infected devices. Cloudflare Ray ID: 67a5d3d6ff1584a4 • Your IP : 188.246.226.140 • Performance & security by Cloudflare. Raspberry Pi Offline - Downloading debian, git and python files for offline install. This is a guide for performing offline installs on a Raspberry Pi, or other debian based computers where you don't have an Internet connection. Imagine you have a Raspberry Pi that you want to use for controlling some NeoPixels and for whatever reason you don't have an Internet connection. This could be because you are running this at a Raspberry Jam, or because you want to update a computer that is only available via an internal network. This guide will work through the steps you need to follow to complete the instructions in NeoPixel worksheet without having an Internet connection on the Raspberry Pi. You will still need another computer that does have Internet access (or to have prepared the files in advance) and some way of transferring the files (eg. a USB flash drive). Using apt to catalog and install files. If you have first need to install Debian software then you can first query the files required on the Raspberry Pi offline computer and then download those on a different computer. The files can then be transferred to the offline computer by USB flash drive an installed using dpkg. In this case we need to install scons and swig. To identify the required files first run the following command on the offline computer: apt-get install scons swig --print-uris | tee offline.txt. This will not install the files, but will log the details into a file called offline.txt. An example output is shown below: As you can see all the required files (including a required dependency) are listed at the bottom of the file. You can download these on another computer using wget followed by the name of the file (or download directly within a browser). Now copy the files to the offline computer (eg. using a USB flash drive) and then run: sudo dpkg -i *.deb (in some circumstances you may need to install these in a specific order, however as long as all the files are in the same directory it usually works as a single install. Download from . The next stage in the NeoPixel install is to download some files from github. The instructions in the Raspberry Pi NeoPixel install guide, assume this will be done online, but this can be done using another computer and easily transferred to the offline computer. To download files from github then you can use either wget on the master.zip file or use the "get ZIP" option from a web broser. The unzip command can then be used to extract the files. For example instead of using git clone download the files using: wget https://github.com/jgarff/rpi_ws281x/archive/master.zip wget https://github.com/penguintutor/neopixel-gui/archive/master.zip. Or download using a web browser from: https://github.com/jgarff/rpi_ws281x and https://github.com/penguintutor/neopixel-gui. You may need to rename these once downloading (especially the wget file which will create files called master.zip). Transfer these to the Raspberry Pi and extract the files by entering unzip followed by the name of the .zip file. When downloading the master files from github then it adds "-master" to the end of the directory. You may need to rename the to remove -master eg. mv rpi_ws281x-master rpi_ws281 mv neopixel-gui-master neopixel-gui. Offline install using Python easy setup.py file. One of the steps in the install of the NeoPixel ws281x involves downloading and install the Python setuptools from the Internet. The best way to identify what it is expecting is to run the normal installer and look for any errors where it attempts to get files from the Internet. In this case the rpi_ws281x library install (eg. sudo python3 setup.py install) attempts to use the python easyinstall which first needs the setuptools. The error message shows this as https://pypi.python.org/packages/source/s/setuptools/setuptools-5.7.zip Download this using wget and copy that to the offline computer and install using pip3. sudo pip3 install setuptools-5.7.zip. Now retry the install sudo python3 setup.py install and hopefully it should now work. If not then look for any other errors where it attempts to download something and perform that manually offline. More information. See the guides and blog posts relating to the Raspberry Pi. Also see the Linux Tutorials for more information on using Linux. Linux apt-get command. On Linux operating systems that use the APT package management system, the apt-get command is used to install, remove, and perform other operations on installed software packages. The apt-get command, and other core APT utilities, are available by default in the Debian, Ubuntu, and Linux Mint operating systems. Syntax. Commands. The dist-upgrade command may therefore remove some packages. If a hyphen is appended to the package name (with no intervening space), the identified package will be removed if it's installed. Similarly a plus sign can designate a package to install. These annotation features may be used to override decisions made by apt-get's default conflict resolution system. A specific version of a package can be selected for installation by following the package name with an equals and the version of the package to select. This causes that specific version to be located and installed. Alternatively, a specific distribution can be selected by following the package name with a slash and the version of the distribution or the archive name ("stable", "testing", "unstable"). Both of the version selection mechanisms can downgrade packages and must be used with care. You don't want to manually remove a package that another installed package is dependent on. Source packages are tracked separately from binary packages via deb-src lines in the sources.list file. If the --compile option is specified then the package will be compiled to a binary .deb using dpkg-buildpackage for the architecture as defined by the --host-architecture option. If --download-only is specified then the source package are not unpacked. A specific source version can be retrieved by postfixing the source name with an equals and then the version to fetch, similar to the mechanism used for the package files. This enables exact matching of the source package name and version, implicitly enabling the APT::Get::Only-Source option. Options. All command line options may be set using the configuration file; the descriptions indicate the configuration option to set. For boolean options you can override the config file using something like -f- , --no-f , or -f=no . Configuration Item: APT::Get::Simulate . Simulated runs performed as a user, automatically deactivate locking ( Debug::NoLocking ), and if the option APT::Get::Show-User-Simulation- Note is set (as it is by default) a notice is displayed indicating that this is only a simulation. Runs performed as root do not trigger either NoLocking or the notice; superusers should know what they are doing without further warnings from apt-get . 25 Useful Basic Commands of APT-GET and APT-CACHE for Package Management. This article explains how quickly you can learn to install , remove , update and search software packages using apt-get and apt-cache commands from the command line. This article provides some useful commands that will help you to handle package management in Debian/Ubuntu based systems. APT-GET and APT-CACHE Commands. What is apt-get? The apt-get utility is a powerful and free package management command line program, that is used to work with Ubuntu’s APT ( Advanced Packaging Tool ) library to perform installation of new software packages, removing existing software packages, upgrading of existing software packages and even used to upgrading the entire . What is apt-cache? The apt-cache command line tool is used for searching apt software package cache. In simple words, this tool is used to search software packages, collects information of packages and also used to search for what available packages are ready for installation on Debian or Ubuntu based systems. 1. How Do I List All Available Packages? To list all the available packages, type the following command. 2. How Do I Find Out Package Name and Description of Software? To find out the package name and with it description before installing, use the ‘ search ‘ flag. Using “ search ” with apt-cache will display a list of matched packages with short description. Let’s say you would like to find out description of package ‘ vsftpd ‘, then command would be. To find and list down all the packages starting with ‘ vsftpd ‘, you could use the following command. 3. How Do I Check Package Information? For example, if you would like to check information of package along with it short description say (version number, check sums, size, installed size, category etc). Use ‘ show ‘ sub command as shown below. 4. How Do I Check Dependencies for Specific Packages? Use the ‘ showpkg ‘ sub command to check the dependencies for particular software packages. whether those dependencies packages are installed or not. For example, use the ‘ showpkg ‘ command along with package-name. 5. How Do I Check statistics of Cache. The ‘ stats ‘ sub command will display overall statistics about the cache. For example, the following command will display Total package names is the number of packages have found in the cache. 6. How to Update System Packages. The ‘ update ‘ command is used to resynchronize the package index files from the their sources specified in /etc/apt/sources.list file. The update command fetched the packages from their locations and update the packages to newer version. 7. How to Upgrade Software Packages. The ‘ upgrade ‘ command is used to upgrade all the currently installed software packages on the system. Under any circumstances currently installed packages are not removed or packages which are not already installed neither retrieved and installed to satisfy upgrade dependencies. However, if you want to upgrade, unconcerned of whether software packages will be added or removed to fulfill dependencies, use the ‘ dist- upgrade ‘ sub command. 8. How Do I Install or Upgrade Specific Packages? The ‘ install ‘ sub command is tracked by one or more packages wish for installation or upgrading. 9. How I can Install Multiple Packages? You can add more than one package name along with the command in order to install multiple packages at the same time. For example, the following command will install packages ‘nethogs‘ and ‘goaccess‘. 10. How to Install Several Packages using Wildcard. With the help of regular expression you can add several packages with one string. For example, we use * wildcard to install several packages that contains the ‘ *name* ‘ string, name would be ‘package-name’. 11. How to install Packages without Upgrading. Using sub ‘ –no-upgrade ‘ command will prevent already installed packages from upgrading. 12. How to Upgrade Only Specific Packages. The ‘ –only-upgrade ‘ command do not install new packages but it only upgrade the already installed packages and disables new installation of packages. 13. How Do I Install Specific Package Version? Let’s say you wish to install only specific version of packages, simply use the ‘ = ‘ with the package-name and append desired version. 14. How Do I Remove Packages Without Configuration. To un-install software packages without removing their configuration files (for later re-use the same configuration). Use the ‘remove ‘ command as shown. 15. How Do I Completely Remove Packages. To remove software packages including their configuration files, use the ‘ purge ‘ sub command as shown below. Alternatively, you can combine both the commands together as shown below. 16. How I Can Clean Up Disk Space. The ‘ clean ‘ command is used to free up the disk space by cleaning retrieved (downloaded) .deb files (packages) from the local repository. 17. How Do I Download Only of Package. To download only source code of particular package, use the option ‘ –download-only source ‘ with ‘package-name’ as shown. 18. How Can I Download and Unpack a Package. To download and unpack source code of a package to a specific directory, type the following command. 19. How Can I Download, Unpack and Compile a Package. You can also download, unpack and compile the source code at the same time, using option ‘ –compile ‘ as shown below. 20. How Do I Download a Package Without Installing. Using ‘ download ‘ option, you can download any given package without installing it. For example, the following command will only download ‘ nethogs ‘ package to current working directory. 21. How Do I Check Change Log of Package? The ‘ changelog ‘ flag downloads a package change-log and shows the package version that is installed. 22. How Do I Check Broken Dependencies? The ‘ check ‘ command is a diagnostic tool. It used to update package cache and checks for broken dependencies. 23. How Do I Search and Build Dependencies? This ‘ build-dep ‘ command searches the local repositories in the system and install the build dependencies for package. If the package does not exists in the local repository it will return an error code. 24. How I Can Auto clean Apt-Get Cache? The ‘ autoclean ‘ command deletes all .deb files from /var/cache/apt/archives to free-up significant volume of disk space. 25. How I Can Auto remove Installed Packages? The ‘ autoremove ‘ sub command is used to auto remove packages that were certainly installed to satisfy dependencies for other packages and but they were now no longer required. For example, the following command will remove an installed package with its dependencies. I’ve covered most of the available options with apt-get and apt-cache commands, but still there are more options available, you can check them out using ‘man apt-get ‘ or ‘ man apt-cache ‘ from the terminal. I hope you enjoyed reading this article, If I’ve missed anything and you would like me to add to the list. Please feel free to mention in the comment below. If You Appreciate What We Do Here On TecMint, You Should Consider: TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all. If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation. Use apt-get to download a file. I use the POTATO (version 2.2) release of Debian in my discussion here. To see which version you've got, try. My system is version '2.2.17'. # apt-get install shellutils. to get it, if you don't have it. In addition, I use the tcsh command shell, just to be difficult. Note that your system is BOUND to be different from mine -- type and amount of memory, drive sizes, peripheral gadgets -- so YMMV (your mileage may vary) wildly from mine. Even so, with luck it might prove useful nonetheless. This little gizmo sets up the configuration file for you: It asks you some questions and winds up configuring your /etc/apt/sources.list file. It tells apt where to get the packages from, when you request an update to your currently installed packages or when you ask to install packages you've never tried before. If you don't have apt-setup on your potato (or later) Debian system, get the base-config package, which supplies it: # apt-get install base-config. Of course, you can always set up apt 's sources.list file by hand if you must. Check out. to learn about the format of the 'sources.list' file, if you're the determined type. For a list of Debian mirrors to use there, try http://www.debian.org/misc/README.mirrors" But if you're like me -- lazy -- you'll just run. and be done with it. Keep in mind that Debian is a work-in-progress, meaning that as holes are found and bugs are killed in the stable distribution, a whole new world is developing on the UNSTABLE distribution. If you need something from 'unstable' go ahead and try it -- just don't gamble more than you can afford to lose, right? Venturing into UNSTABLE is fine if you don't mind being on the "front lines" so to speak. Most of us stick with the stable distribution, which has no new gizmos being created; only patches and fixes are added to the stable release. You might occasionally want to delve into UNSTABLE territory, for some new functionality that's not available in the stodgy, old, stable area. It's up to you, but don't expect a refund if something breaks -- it's called UNSTABLE for a reason! Starting in 2001 a new distribution of Debian is available. It is called testing , and it covers the ground between stable and UNSTABLE . Testing is made of packages that have survived 14 days in unstable without breaking. Major life-threatening bugs are thus solved before making their way into testing. However, that also means that security upgrades are also at least 14 days behind schedule. However if your version of apt supports it ( >= 0.5 ), there is a very easy way to follow multiple distributions, it is called pinning: 1 Package: * 2 Pin: release a=stable 3 Pin-Priority: 900 4 5 Package: * 6 Pin: release a=testing 7 Pin-Priority: -10 8. then you must add lines for both stable and testing to your /etc/apt/sources.list and do an apt-get update which will download the usual files twice , one for each distribution. After this, you can use the -t option to choose which distribution you want to get packages from: # apt-get -t testing install sgmltools2. The Pin-Priority fields ensure that unless you specifiy it manually, all packages will be taken from the stable distribution (of course, dependencies are always met, so you might have to download more than one package from testing) If you're running a live server, where any uncertainty or instability would be a definite liability, definitely shy away from UNSTABLE or even testing unless you enjoy soothing the frazzled nerves of management, and their paying customers, and your spouse, who keeps asking why you're always looking for a new job. So you've got your Debian system humming -- you don't need to let it fall behind! You can easily stay up-to-date with the latest security patches, any bug fixes and an occasional enhancement. That's the beauty of apt . to refresh the list of available packages -- if new things are available, that is how your Debian system will learn of it -- and then simply. which downloads, configures and then replaces any packages you've already got that have been tweaked. You'll probably want to do it periodically, to squash bugs and plug security holes. " NOTE that the Debian gurus work like the dickens to see to it that your settings are not clobbered when you upgrade a package or two. You may have spent a month getting exim or inetd to hum your very own tune, and heaven help the miscreant who clobbers your settings, right? Sometimes there's enough of a difference between what you've been running (the old version) and the upgrade to be installed (the new version) that the old settings may not be usable by the new program; in this unusual case, apt informs you that your old settings are being saved, and in order for the new program to function the way you want it to, you'll have to migrate your settings by hand. But this is rare -- usually, your settings stay right where you put them and you'd hardly ever know anything had improved. " All this happens without having to restart. (For Mac and Windows people -- imagine leaving your computer up for two MONTHS! It's awesome!) Once you're online, it's easy to install new packages you're interested in; simply do something like. # apt-get install vim traceroute mysql-server mysql-client # apt-get install logcheck.