hoy aprendí ...

… a recordar como montar un cdrom en linux

How to mount cdrom in Linux

15 October 2021 by Luke Reynolds

These days, CDs and DVDs are becoming less popular, in favor of flash drives and other convenient, portable media. However, you still may come across them every once in a while, and if your computer has a CD drive, you should be able to insert a disc and mount it on Linux.

In this tutorial, you’ll see the Linux commands necessary to mount a CDROM.

In this tutorial you will learn:

  • How to mount cdrom in Linux
CategoryRequirements, Conventions or Software Version Used
SystemAny Linux distro
OtherPrivileged access to your Linux system as root or via the sudo command.
Conventions# – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

Follow along with the steps below to mount a CD or DVD in Linux. Start off by inserting the disc into your computer, then run through these steps:

  1. First, try using the blkid command to see what device file your CD is using. Usually, this is going to be /dev/sr0, but it’s possible that yours is something different. You’ll know it’s the right one because it should say ISO9660Viewing device file path of cdrom in Linux
  2. Next, create a mount point for where you’d like to mount the CD to. Or, just pick an empty directory somewhere on your computer, if you already have a place in mind.$ sudo mkdir /mnt/cdrom
  3. Now we can use the mount command to map the device file to the directory we’ve just created.$ sudo mount /dev/sr0 /mnt/cdrom mount: /mnt/cdrom: WARNING: device write-protected, mounted read-only.
  4. Your CD or DVD should now be accessible in the directory which it was mounted to.$ cd /mnt/cdrom You can also verify that the mount was successful by using the mount command without further options.$ mount | grep cdrom Accessing a mounted cdrom in Linux
  5. When you are done, just unmount the CD and eject it from the disc tray.
    $ sudo umount /mnt/cdrom

Closing Thoughts

In this tutorial, we saw how to mount a CD or DVD rom on Linux systems. As you can see, the process is quite simple, and you will probably be able to do it in the future without a problem, now that you have done it once. Mounting and accessing a CDROM is pretty similar to mounting any other type of media.

hoy aprendí ...

… a realizar chapucerías con caracteres y fórmulas en hojas de cálculo

Resulta que una tabla con nombres debía prepararla para ser procesada por PHP para generar contenido repetitivo. El nombre de la persona escrito de manera normal debia luego usarlo como nombre de archivo en el servidor web para cargar la foto, dejando todo en minúscula y reemplazando espacios con guión bajo, y acentos.


Juan Pérez -> juan_perez

Resulta que en LibreOffice Calc (y asumo que en Excel también) hay una funciones para trabajar con strings (cadenas de caracteres).


Básicamente logra pasar a minúscula y reemplazar los espacios.

Juan Pérez -> juan_pérez

La última parte de reemplazar los caracteres especiales de acentos, ñ, y apóstrofes lo terminé realizando en PHP con la ayuda de

function eliminar_acentos($cadena){

    //Reemplazamos la A y a
    $cadena = str_replace(
    array('Á', 'À', 'Â', 'Ä', 'á', 'à', 'ä', 'â', 'ª'),
    array('A', 'A', 'A', 'A', 'a', 'a', 'a', 'a', 'a'),

    //Reemplazamos la E y e
    $cadena = str_replace(
    array('É', 'È', 'Ê', 'Ë', 'é', 'è', 'ë', 'ê'),
    array('E', 'E', 'E', 'E', 'e', 'e', 'e', 'e'),
    $cadena );

    //Reemplazamos la I y i
    $cadena = str_replace(
    array('Í', 'Ì', 'Ï', 'Î', 'í', 'ì', 'ï', 'î'),
    array('I', 'I', 'I', 'I', 'i', 'i', 'i', 'i'),
    $cadena );

    //Reemplazamos la O y o
    $cadena = str_replace(
    array('Ó', 'Ò', 'Ö', 'Ô', 'ó', 'ò', 'ö', 'ô'),
    array('O', 'O', 'O', 'O', 'o', 'o', 'o', 'o'),
    $cadena );

    //Reemplazamos la U y u
    $cadena = str_replace(
    array('Ú', 'Ù', 'Û', 'Ü', 'ú', 'ù', 'ü', 'û'),
    array('U', 'U', 'U', 'U', 'u', 'u', 'u', 'u'),
    $cadena );

    //Reemplazamos la N, n, C y c
    $cadena = str_replace(
    array('Ñ', 'ñ', 'Ç', 'ç'),
    array('N', 'n', 'C', 'c'),

    //Reemplazamos apróstrofes ' ’ ` ´
    $cadena = str_replace(
    array("'", '’', '`', '´'),
    array('', '', '', ''),

    return $cadena;

Y chau