Sign In

    Enjoy FOSSwire's content? Have it delivered! Subscribe

    Command Line Tip - Verify Downloaded Files

    CD image - source http://www.sxc.hu/photo/1015749

    Ever wondered what that MD5sum and SHA1sum things are when you are downloading ISO images? Whether it's a Linux distro, or any other file, you might have seen these 'checksums' floating around.

    Their purpose is to allow you to verify that you have a complete and uncorrupted copy of a file. If you can generate the same checksum with your copy of the file, then the file must be a true copy.

    So, how do you verify these checksums?


    For Windows users

    Windows users - you need to first download both md5sum.exe and sha1sum.exe from the CentOS dostools page. Once they've downloaded, copy them to C:\WINDOWS\system32 (so you can use them from the command line without typing the whole path).


    Pretty simple. Open up your command line terminal - usually in Accessories or System Tools on Linux. Windows users - you'll want to do Start > Run > cmd.exe > OK.

    Then simply type either md5sum or sha1sum, followed by the full path to the downloaded file.

    For example, if I want to verify the MD5 of ubuntu-8.04.1-desktop-i386.iso stored in /home/peter/Downloads, I'd do this:

    md5sum /home/peter/Downloads/ubuntu-8.04.1-desktop-i386.iso

    Similarly, to check the SHA1 sum:

    sha1sum /home/peter/Downloads/ubuntu-8.04.1-desktop-i386.iso

    After some calculation, which might take a while depending on file size, you'll get a checksum of your own. Compare this to the one listed on the website you downloaded from.

    If the two checksums match, your copy is complete and true. Burn with confidence!

    Windows users - your paths will look something more like: md5sum "C:\Documents and Settings\Peter\My Documents\Downloads\ubuntu-8.04.1-desktop-i386.iso". It's just the same idea, though!

    [image source]


    Exclude Packages from being Installed and Upgraded in Debian/Ubuntu

    Package - http://www.sxc.hu/photo/918252

    Package managers make life on Linux a whole lot easier. Instead of managing bits of software by yourself and sorting out the inevitable dependency hell, where one package depends upon another and that depends upon yet another and so on, you can have a clever bit of software do all the work.

    Debian, Ubuntu and other derivatives use the .deb package format and Aptitude (Apt for short) as the package manager.

    However, there are some occasions when your package manager can hinder, rather than help. It may end up insisting on installing or upgrading something you don't want, or upgrading something you want left alone at its current version. Its persistence could extend to your update manager on your desktop nagging you every five minutes - wouldn't it be nice to shut it up?

    To avoid this problem, Apt users can specify to put specific packages on hold, preventing them from being upgraded or installed. Of course, you can easily remove this restriction later.

    To do this, first install the Wajig program, which offers a simple command line interface to Dpkg and Apt.

    $ sudo apt-get install wajig

    Once the program is installed, you can put a package on hold, so it will be ignored by Apt, like so:

    $ sudo wajig hold package

    When you now go to upgrade or install new packages, you will not be pestered to update that package.

    Naturally, when you want to remove this restriction, simply run the command again with 'unhold':

    $ sudo wajig unhold package

    Also, if at any time you want to see the list of packages that are on hold, run:

    $ sudo wajig list-hold

    A simple solution to what can be a rather irritating problem.

    [image source]


    Video Tutorial - Getting Started with GNU Screen

    Peter Upfold takes a look at GNU Screen and gives a tutorial on how to use its multi-session capabilities, as well as renaming your sessions and using detaching and re-attaching.

    1. 1
    2. 2
    3. 3
    4. ...
    5. Go to