Internal vs External Linux shell commands

Introduction

It is our firm belief that Linux, despite its advances on the desktop side, as well as on tablets, should be taught starting with the command line. That’s because it’s an operating system that borrows heavily from Unix(TM), and there was nothing more than a text interface on it at the very beginning. Studies have shown that, if applicable, one is more efficient on the command-line rather than using a graphical user interface (GUI). “If applicable” means that we’re not referring at photo/video editing or some other task that requires a graphical environment. It means that when there is a task that can be solved either via the command line interface (CLI) or via GUI, the CLI way is more efficient. Another thing to be considered is the fragmentation of the Linux world. For example, OpenSUSE’s YasT won’t be available on any other distro, so it’s a specific piece of software. This fragmentation is seen also in the CLI world, especially when it comes to the locations of various files, but we will make you aware of it, should that be the case. In case you’re not convinced yet, remember that you don’t know Linux, or any other similar operating system, until you know your way around its CLI. The power of Linux lies there, and if you want to make a career out of it, follow along: it’s an interesting and fun journey.

Internal vs external Linux shell commands

You may be puzzled by this choice of words, and with good reason. But it’s a terminology you will encounter often, along with the term “(shell) built-in” when referring to internal commands and perhaps “the rest” for the external ones. But before we go that far, let’s make sure we’re on the same page. The shell we’re gonna work with is bash, as it’s the most used on Linux distributions. That’s not saying it’s the best, but that’s a subjective term anyway. I don’t know of any popular and still maintained Linux distribution that uses any version of bash prior to 4.xx, so that’s what we will use too. Regarding the ever-controversial distribution support, LPI seems to focus mainly on Red Hat and Debian or derivative distributions (e.g. Fedora or Ubuntu), so this is what we’ll support as well. However, at this level at least, the distribution is less relevant: what is important is an up-to-date shell and distribution.

Read more

The clean and modern Plasma desktop

Plasma 5: Loaded With Useful Features

Current State of Plasma 5

Most Linux users know that KDE is a feature rich desktop environment with a whole suite of applications for nearly every task imaginable. What many Linux users don’t know is how far the KDE team has stepped up the level of completeness in the latest releases in Plasma 5. As of the latest release of KDE Plasma 5(5.6 at the time of this article), the KDE team has been packing Plasma with a ton of interesting and convenient features that show just how modern and convenient the Linux desktop experience can be.

Read more

How to list all files installed by RPM package

The easiest way to locate all files installed from RPM package on your system is to check a RPM package manifest which shows all files and location for any particular RPM package. Let’s say that I downloaded a telnet-server-1.2-137.1.i586.rpm RPM package from some online source and I wish to see what this package contains and what files will be installed into the system. The following linux command will reveal all that information:

# rpm -qlp telnet-server-1.2-137.1.i586.rpm

Read more

How to view and clear Bind DNS server’s cache on Linux

View cache

A configured domain name service ( DNS ) server such as Bind may store previously resolved domain names to a local cache. By default the cached records will be stored for 7 days. The cache can be reused for future domain name resolutions. First, let’s see how we can view all cached domain name resolutions:

# rndc dumpdb -cache

The above command will dump bind’s cache into /var/cache/bind/named_dump.db. In case you cannot locate this file after you have executed the above command then check your server’s configuration files to reveal the location of cache dump file. To view cached dns records simply cat or grep the resulting dump file. For example:

# grep gnu.org /var/named/data/cache_dump.db
gnu.org.                86358   NS      ns1.gnu.org.
                        86358   NS      ns2.gnu.org.
                        86358   NS      ns3.gnu.org.
ns1.gnu.org.            86358   A       208.118.235.164
ns2.gnu.org.            86358   A       87.98.253.102
ns3.gnu.org.            86358   A       46.43.37.70

Read more

Batch image resize using Linux command line

Question

How can I batch resize multiple images using Linux command line? Is there any tool which would help me with this and/or is there GUI application which makes image resizing easy. I have hundreds of images and therefore I’m in the need for such a tool which I also can use in combination with shell scripting.

Read more

Slackware and arch linux

Getting what you want on Arch and Slackware – AUR and Slackbuilds

Slackware and arch linux

Package management on Linux systems has always been the subject of endless discussions, flamefests and bickering. Nonetheless, regardless of what one prefers, there’s something for everyone, if not in distro X, then maybe in distro Y. Some swear by binary package management, others say that the only true way is compilation from source. Today we will focus on two distributions that offer the best of both worlds : Arch Linux and Slackware.

Read more