Sign In

    Enjoy FOSSwire's content? Have it delivered! Subscribe

    Dig into your system with HardInfo

    We all like to learn a little bit about our computers and how they stack up against others. Even if not, the information might be valuable to others trying to diagnose a problem with your machine. There are many ways to discover information about your hardware in Linux, but none of them have come close to the ease-of-use of HardInfo (install).

    HardInfo takes everything it can find about your system and presents it in an organized fashion. There’s no need to dig through the output of lspci or run a few commands to find out some network statistics; it’s all right there in front of you.

    One key feature that makes HardInfo valuable is its ability to quickly generate a system report. This can be very useful to bug triagers, developers, or your laptop’s eBay listing.

    Finally, HardInfo is a great tool to use to rank your system against other machines with various benchmarks, which can tell you if your machine is running at full speed or if something is going terribly wrong. These are also included in the generated reports.

    Overall: great tool, easy to use, useful for everyone. Give it a try.


    Sudo and Su

    You've probably seen one of these commands. Ubuntu users have seen more of sudo, while SUSE, Fedora, and Debian have used su more often. What exactly is the difference?

    Both of the commands enable you to gain root access. The major difference is in how privileges are obtained.

    Su


    Su is a command that enables you to open a shell or login as another user. Run without any parameters, su assumes that you want to become root. When run, you will be prompted for a password. This password is the password of whoever you want to switch to. For example, if I want to become root, running su at a terminal will ask me for root's password. If I run su bill, I will need to type in bill's password.

    Once a password has been entered, a shell will open as if you had logged in as the su'd user. Anything you run from it will appear to come from that user.

    Sudo


    On an Ubuntu system, running su by itself to become root won't yield any results. Root by default does not have a usable password, so there is no way you can type one in to gain privileges. This is where sudo comes in. Sudo enables you to run a single command as another user (normally root).

    The major difference here is that you enter your own password instead of someone else's. This enables a system with multiple administrators to not have to share a single password. When run as sudo -s, a root shell will be opened, as with su.

    Combining the Two


    In most cases, su is available on any system, even if it cannot be used directly. Sudo, on the other hand, usually is only available for a Debian or derivative system. Because of these, there are several tricks we can accomplish on an Ubuntu system:

    sudo su # same effect as sudo -s

    In the example above, sudo is used to gain root privileges. Because of this, su is essentially run as root. When this happens, su does not require a password to be entered, so this can be used as an alternative to sudo -s.

    Taking that example further:

    sudo su bill # same effect as sudo -s -u bill

    This would grant a shell as the user bill. Again, you only have to type in your own password.

    There are a few more tricks out there that can be accomplished with sudo and su, but that's up for you to discover.