Tag Archives: linux

alias ll=?

On Ubuntu the default alias for ll is:

alias ll='ls -alF'

but my favourite one is:

alias ll='ls -lrhat --group-directories-first'

(or “list sorted by modification time, reversed, in long format, human readable with folders first”).
To remember it I just remember “Linux Red HaT” (my firsto distro in nineties)

What’s yours?

Leave a comment

Posted by on 2016/01/28 in sys


Tags: , , ,

make some code!

If you know this pattern:

sudo make install

you know how to build and install something in your computer.

Maybe you also know that it’s better to keep the folder you used to build, because you can do:

sudo make uninstall

and – if you’re lucky – the compiled software will be removed from your pc.

There’s a better way to do that.
There is a utility that generates a (Slackware, RPM, or Debian) package of your software and install this package using the package manager:

sudo checkinstall

You will be able to uninstall the software using your package manager, this way. No more “whereis / locate”, no more “rm -rf”, no more dangling references.

Further readings on and

Leave a comment

Posted by on 2014/05/23 in dev


Tags: , , , , ,

USB Debugging

Some link useful to poke around our USB devices:

Debugging USB Problems
USB docs from

In brief

Listing the USB devices:



cd  /sys/bus/usb/devices/
ls -l

or (raw)

lspci | grep USB

Seeking for errors (it’s useful to remember 🙂 )


Talking with the device

Writing some parameter to the device (see docs to know what you’re doing):

echo 0 | sudo tee /sys/bus/usb/devices/usb2/power/autosuspend_delay_ms

or (as root)

# echo 0 > /sys/bus/usb/devices/usb2/power/autosuspend_delay_ms

ot talking to the module:

modprobe usbcore autosuspend=5

Resume a not working USB port

There’s a lot of people (mee too) that at some point has one/all USB port(s) not working.
I found that should be something related to the voltage protection of the port. It will be fixed turning off the PC (from the power supply) for 1 or 2 minutes.

If you cannot turn off the pc there’s another way: remove the usb modules then load them back:

# rmmod uhci_hcd
# rmmod ehci_hcd
# modprobe ehci_hcd
# modprobe uhci_hcd

Remember that UHCI is for USB1 and EHCI is for USB2.

Leave a comment

Posted by on 2014/04/24 in sys


Tags: ,

Retroarch ALSA audio over HDMI … working!

First we need to know where the HDMI output is on our hardware. Let’s use the aplay command:

aplay -l

This will return something like the following lines:

card 0 ... device 0: ... Analog ...
card 0 ... device 1: ... Digital ...
card 0 ... device 3: ... HDMI ...

In my hardware configuration I found that my integrated onboard audio card “0” uses the “3”rd device as HDMI out.

In my “retroarch.cfg” file I wrote the following (notice the mysterious “audio_device” parameter):


I noticed that the out rate parameter at 44100 is mandatory. With another values (i.e. 22100) the audio was not working.

The only issue is that when the emulator runs at < 100% the audio is glitchy. I can try disabling rewind: it seems emulation runs faster this way.
Some user reported that this problem doesn’t exist using SDL (not yet tried).

Some reference:


Posted by on 2014/02/28 in sys


Tags: , ,

ArchLinux VM

A very well done guide (in Italian):

I setup a Virtualbox VM in minutes … the only difference is that I used the following command:
pacstrap /mnt base

1 Comment

Posted by on 2014/02/18 in sys


Tags: ,

PXE tales

Thanks to Specter1981. This is just an updated version of his post.

Download needed files

Download CrunchBang Linux 11 “Waldorf”.
From the iso file extract the following into a “PXE” folder (see image below):


Download the pxelinux.0 file from the Debian Wheezy repositories. It is a modified version of syslinux. It is primarily a Linux loader capable of loading other operating systems. Put it into the “PXE” folder.

Finally create a “pxelinux.cfg” folder and create a text file named “default” into it. This is the content of the file:

DEFAULT CrunchBang
LABEL CrunchBang
  kernel vmlinuz
  append initrd=initrd.gz

The resulting folder will be:

Using your preferred method (‘dd’ copy, UnetbootIn, ..) prepare a CrunchBang USB pen (see here for details).

Setup the Client

Enable the Network Boot from BIOS as primary choice.
Connect the USB (CrunchBang) pen to the computer. The USB port will be automatically recognized during the install phase.

Setup the server (Win7)

Download and extract the “Tftpd32 (by Ph. Jounin)” server. I used the “tftpd64 standard edition (zip)” v4.50.

Add a rule to the Windows Firewall to allow TFTP incoming connections:
Start -> Administrative tools -> Windows firewall with advanced security-> Inbound rules -> TFTP allow (on any profile)

Configure the TFTP / DHCP server

Now connect the client with the server. I used a crossover network cable but a normal cable should works.

Configure and start the server:

Boot the client and enjoy your install!

Final note

I had one error during setup. It wasn’t able to configure the network…I skipped that step and everything was completed successfully (with working network :).

Leave a comment

Posted by on 2014/01/31 in sys


Tags: , , , ,

Slax 7 on HDD: how to fix the “failed to load com32 file /slax/boot/vesamenu.c32” boot error


I succesfully installed Slax 7 on my HDD using the ./ command then, on boot, the system was unable to boot from the HDD. I found that when this error occurs, it is needed to change the SYSLINUX bootloader with another version (don’t know why).
I tried the one suggested in the other post and it worked fine.
To install the bootloader we’ll use the extlinux utility (the synopsis says that it works on ext2 / ext3 filesystems, I was on an ext2 fs).

Download syslinux-4.06.tar.gz and bring it into a newly created folder of the hdd. Then

tar xvf syslinux-4.06.tar.gz
cd syslinux-4.06/extlinux
./extlinux --install /media/system/slax/boot/

Remember that my hdd was labelled “system” and (automatically) mounted on /media/system/


Posted by on 2013/09/11 in sys


Tags: , ,