Linux.com

Community Blogs



Slackware Linux Tip-of-the-day: The alias command

The alias command allows you to setup a one line command to be run under an alias in bash. A simple example is : 

 

  • alias=ls, this allows you to invoke the ls command by typing dir (this can be useful for windows users). 

 

The alias command can be invoked within the command line, within a script or as part of your .bashrc file.

 The limitation is that the alias only exists within the shell that it was invoked in, if you run it as a command in a terminal the alias will be removed when the terminal closes. the exception is when you add it to you .bashrc file, when it is loaded into this file the alias will be present in all future bash terminal sessions. 

The site http://www.linfo.org/alias.html hasmore information and some examples to help you get comfortable with the functionality.

The base files is different for each shell type, but since bash is the most used I am covering it here.

 

Debian: Find package name from program name

Back again,
This time it's Debian's time, when managing multiple hosts and installations sometimes happens you need to know what package owns a certain utility.

Recently I've faced a quite common problem, I'll take it as an example so it's more clear, I had a common and popular program "pdftotext" and I wanted to have it into another debian installation, quite easy isn't it ? you only need to remember what package has it.

While fighting with Ghostscript program and PostScript files was quite easy to check where this utility is, just take a look at ghostscript related packages (with apt-get, aptitute, ...) and see where your program could be (guess it...)

In my particular case "pdftotext" (my example) wasn't inside some package called "ghostscript*" but inside "poppler-utils"; don't want to blame poppler maintainers but I don't really remember where the utility was

So while looking at dpkg (Debian father for all CLI packages utilities) command line I was captured by -S switch and here's my final solution:

mymachine:/# dpkg -S `which pdftotext`
poppler-utils: /usr/bin/pdftotext

And here's, easy and dirty trick to get information from an utility name, then poppler-utils was my package name and I've installed it in the other machine

This goes for Debian, Ubuntu and mainly Debian based distros

 

Easy, isn't it ?

 

Hope it helps, glad to hear your comments

Andrea (Ben) Benini

 

 

Slackware

Slackware 12.2:

It's same old slackware  style -- a simple distro, but with a twist....

Aside from a new kernel that supports some new driverless web cams

It also packs an upgrade/patch tool in the form of slackpkg, which greatly simplifies getting the latest patches/upgrades.

 It also works with common wifi devices out of the box, so no need to search for and download  drivers for your wireless LAN devices

 Another thing to watch out for is the 64 bit Slackware, which may be coming out really soon...

check out www.slackware.com 

 

 

 

Counting the days.

As I wait for the next release of Fedora in 6 days, recently I have been spending some time away from GNU/Linux and playing with OpenSolaris UNIX. And might I add that it is a very impressive distribution. From the implementation of ZFS (and the Time Slider feature in GNOME) to Dtrace along with some other nice features.

I have worked with Solaris for many years and while Sun has always been ahead of its time with features and functionality, they always lacked in usability over the GUI. Usability over the CLI was always great and always there, it is just the GUI never looked good as it traditionally defaulted to CDE until recently (GNOME).

Spending more time with ZFS just makes me look forward to seeing a stable Btrfs in the Linux kernel.

 

Ubuntu Developer Summit for version 9.10

From Site :

25.05.09  Ubuntu Developer Summit for version 9.10 is beginning.

 

At the beginning of a new development cycle, Ubuntu developers from around the world gather to help shape and scope the next release of Ubuntu. The summit is open to the public, but it is not a conference, exhibition or other audience-oriented event. Rather, it is an opportunity for Ubuntu developers -- who usually collaborate online -- to work together in person on specific tasks.

Small groups of developers will participate in short Forum and Workshop (formerly called "BoF"/Birds-of-a-Feather) sessions. This allow a single project to be discussed and documented in a written specification. These specifications will be used for planning the new release of Ubuntu, as described in FeatureSpecifications and TimeBasedReleases.

 

Gentoo Easy Upgrade Script

If you just followed my previous blog about Gentoo you'll probably trying to understand what "easy upgrade" is for me and what I've to do for maintaining my system up to date.

If you take a look at the Gentoo Handbook you'll see how you can install and upgrade your system, expecially read Gentoo Upgrading Guide for making these tasks.

Syncing Gentoo portage is basically like the BSD upgrade, for a quick upgrade I've just made a script few years ago with the same commands listed in Upgrade guide, please feel free to contribute or mail me for corrections on the script.

But before the script it's important to understand the golden rule: read what your computer is writing to you, I think it should be applied to everything but expecially read what is saying, that's why I've placed a pause after each command; for example if you need to upgrade portage because it's telling you so then you've to do this so interrupt the script and upgrade portage, then re-run the script again from the step you're.

Comments and suggestions are welcomed:

#!/bin/bash
keypress() {
echo -n "hit any key to continue..."
read -n1 -e -r 2> /dev/null
echo
}

clear
echo "System Upgrade Script"
echo "--------------------------------------------------------------------------------"
echo
echo -n -e "portage sync ? ([y]/n) "
read key -n1 -e -r 2> /dev/null
if [ "$key" == "n" ]; then
echo
else
echo "Portage Sync"
emerge --sync
fi

echo
echo "Complete system upgrade (emerge --update --deep --newuse world)"
keypress
START=`date`
emerge --update --deep --newuse world
STOP=`date`
echo "Start : "$START
echo "End : "$STOP

echo
echo "Configuration files upgrade (etc-update)"
keypress
etc-update

echo
echo "Dependencies Clean (emerge --depclean)"
keypress
emerge --depclean

echo
echo "Dependencies Check and Rebuild (revdep-rebuild)"
keypress
revdep-rebuild

echo
echo
echo
echo "--------------------------------------------------------------------------------"
echo " System Upgrade Completed"
echo "--------------------------------------------------------------------------------"
echo
echo

RSync connection to gentoo hosts is maded only if you need it,  if you need to upgrade your system just make it once a day, it doesn't make sense to flood gentoo servers with rsync requests, and of course you'll be banned if you do so

Hope it helps

Any hints ?

 

Gentoo and BSD (a primer)

One of the best things from a metadistribution like Gentoo is its approach to upgrades and management

I've started using UNIX systems with Minix and Xenix, in '92-'93 I was rolling my Slackware distro with a brand new kernel called Linux, nobody knows it but it was fine and I was happy with it, never tried other Unices and neither worked with others. After a short period I've started on working with UNIX systems heavily and I've seen a lot of them, one of the biggest complaints were the system upgrades... oh what a mess.

While using Microsoft operating systems, upgrades were not even considered but after facing UNIX and some development movement due to Linux grow I was thinking upgrades are one of the most important parts of an entire system, one of my biggest concerns was:

"ok now I've a full upgraded/stable/configured system, it was a pain to get everything working but now it's fine, how can i maintain it stable forever ?"

Each time a major release came out configuration and reinstallation problems were the most common

After few years, I think '94-'95 I've tried something from the BSD world, I didn't remember what (think OpenBSD), one of my biggest problems there was: "where are my applications ? how can I install packages ?". Hell there weren't available in my system CD and I was searching for them across the net; after few good docs I've learned about package distribution and how my system can handle upgrades, it was a revelation to see source code packages (builds), download the source, auto-patch, compile and then install. The best thing I've ever seen and I was thinking something like: "oh damn, I wish to have something like this for Linux as well".

After it I've started using Linux from scratch approach (LSB), it was nice but each "major" upgrade was still a pain and I still need to patch and control everything by hand... since a day, a strange day, I was googling around and I saw the latest distribution of the day, it was called Gentoo. I've learned about Gentoo because one of the lead BSD developers ported its experience to Linux, I was following BSD (still I'm on it) and learned about this new distro.

I've tried it for a while and I was so impressed about portage and meta-packages, so I've decided to use it as my Main distro (I'm writing this blog from a Gentoo desktop system). Other features like code optimization and C compiler flags scared me for a while but now I'm fine and I can live with them

Here's how I've approached Gentoo, still using it since a lot of time and still happy with it

 

 

Titling...

Linux.com testing blog service.
 

Tips and Tricks for the openSUSE News

Hi

 I am writing the section in the openSUSE News and I am searching for some nice articles about a good solution how to configure a tool or some usefull code snippets. 

So if you have some nice ideas, write a usefull article or talk to me first and then send the article to me and I will try to add it into the News.

 Contact: go to my homepage and there is a contact section, how to contact me.

 

Sebastian 

 

Slackware officially goes 64bits!

Well, this is a surprise for me! one of the oldest Linux Distributions (which is also my favorite): Slackware, is getting ready to have a X86_64 (aka amd64) version at their next release, currently the 64bit version is available only at the Slackware-current branch and not intended for production use of course.

This version will be multilib which means it will include 32 and 64 bits version of the libraries, contrary to the polemic Bluewhite64 Slackware port which only uses 64 bit libraries.

It will be very interesting what does this means for the unofficial Slackware ports around there and mostly for Slamd64 which was the first 64bit port of Slackware.

 

 

Fedora 11 first impressions

Being impatient, as usual, I couldn't wait for the official release date, heh.

So far I've updated two of my Linux boxes (work and main home PC) using yum.  There were a few hiccups, but nothing I couldn't handle.  Mainly just some depsolving issues that required that I remove packages, and some signing problems that required I do "--nogpgcheck".  I don't recommend doing it this way unless you have a pretty in depth understanding of the packages on your system, what they are for, and yum and RPM in general.  If you care if you hoze your system, or don't feel confident that you can solve whatever problems come up, wait for the DVD release and upgrade that way.

After the updates were all done, /etc/sysconfig/redhat-release shows "Fedora release 11 (Leonidas)", and we're about a week out from the official release, so I figure not much will change before it officially goes to general release.  Here's a gratuitous uname -a as well ;)

"Linux cube64.int.hozed.net 2.6.29.3-140.fc11.x86_64 #1 SMP Tue May 12 10:44:27 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux"

The only disappointment is that the on-board audio on my home system's motherboard still doesn't work properly under PulseAudio.  Not a huge surprise, since it didn't work under 10.  I usually use a USB headset, so it's not a show stopper, but it is a bit annoying.  I really wish that the ALSA driver and Pulse would play nice.  The sound will "work" if I disable glitch free, but it sounds like crap.  I don't hold it against Fedora, because all distros that have switched over to Pulse seem to be having the same problems.  I'm still amazed that the audio subsystem seems to be the most trouble prone part of Linux on the desktop.  I can run DirectX games written for another operating system full screen at 1920x1200, do all sorts of advanced network magic, etc, but can't get sound to work right on a very common audio chipset (Intel HDA).  It just seems so counter-intuitive.  That said, when Pulse/ALSA play nice, it's awesome sauce.  Hopefully by F12 this will all be straightened out, but I'm not holding my breath.  I do think the various distros have jumped the gun a bit on making it THE audio subsystem, but I suppose it wouldn't really get widely tested otherwise. 

On a good note, when using my USB headset, as well as the onboard chipset on my office PC, sound works flawlessly.  Also, Pulse's CPU utilization has dropped to around 1% when playing sounds and under 1% when idle, which is an improvement.  (doesn't hurt that I've got a quad core Phenom II at 3ghz though, heh, so YMMV)

But, anyway, this isn't meant to be an audio rant. ;)

Over all, things look more polished.  I really like the changes to the update app.  The audio preferences overhaul looks nice too, however power users may find it a little overly simplistic.

On a side note, I just upgraded to a 28" widescreen LCD, and everything looks sexier at 1920x1200!

Boot and shutdown times are noticeably faster.  I was actually a little surprised the first time I rebooted.  If it hadn't been for the delay when the Nvidia video driver's init script kicks off, and the time spent acquiring a DHCP lease from my ISP, my boot time from GRUB to GDM would have been under 20 seconds. 

Over all, the system feels snappier, but that may just be my imagination.

Every piece of hardware was recognized perfectly from the first boot, and it "just works" with the exception of the audio stuff mentioned above.  The only third party driver I have installed is the Nvidia driver, but that's for the sake of gaming, not general use.  The video worked fine for normal desktop stuff on the open-source driver.

The virtual machine manager has a nice improvement in that you can assign USB or PCI devices to a virtual guest through the GUI now.  I've been looking forward to that feature.  There looks to be an easy GUI way to migrate hosts as well, though I don't have the setup to test that particular feature.

Over all, I'm very happy with my shiny new Fedora.  I'm looking forward to the MythDora 11 release for my mythbox, and I'll be upgrading my other PC and my laptop, as well as our virtualization server at work to F11 soon as well.

 
Page 16 of 18

Upcoming Linux Foundation Courses

  1. LFD331 Developing Linux Device Drivers
    13 Oct » 17 Oct - Virtual
    Details
  2. LFS425 Linux Performance Tuning Crash Course
    16 Oct » 16 Oct - Düsseldorf, Germany
    Details
  3. LFS220 Linux System Administration
    20 Oct » 23 Oct - Virtual
    Details

View All Upcoming Courses


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board