Results 1 to 8 of 8

Thread: Help with a Terminal Command

  1. #1
    Join Date
    Apr 2010
    Location
    Wasteland, USA
    Beans
    Hidden!
    Distro
    Kubuntu 13.10 Saucy Salamander

    Help with a Terminal Command

    I'm was troubleshooting another issue when this came up.

    I found a website with a suggested solution for my problem, but it contains a terminal command I'm not familiar with, and it apparently has no man-page. I'm wondering if this means it's not actually a terminal command, but some kind of executable? Some googling didn't really get me a concrete answer, but I gathered it's something like the "ls" (list) command. Anyway, not a big problem, I just like to understand what a terminal command does before I use it, both for safety and because I enjoy learning about linux.

    The command is
    Code:
    ~$ ll
    just two lower case L's

    It's being used in the following context
    Code:
    ~$ ll /dev/disk/by-partuuid
    It's UBUNTASTIC!
    -Custom Built Box Ubuntu 12.04 & Windows 7 dual boot: AMD-fx6300 3.5 GHz, Asrock 990FX Extreme4, Radeon HD7870, Ares 1600 Ram, Samsung EVO SSD, Momentus Hybrid HDD.
    -Thinkpad T500: KDE-Ubuntu 13.10 & Windows 7 dual boot

  2. #2
    Join Date
    Sep 2006
    Beans
    8,627
    Distro
    Ubuntu 14.04 Trusty Tahr

    alias

    It's an alias.

    Code:
    alias ll
    alias
    alias is a built-in capability in bash. If you dig deep in the manual page for bash, you can find a description of it and other built-in capabilities. It's useful for making shortcuts for long, but frequently used, commands. It's down in the section on 'shell builtin commands'

    Code:
    man bash

  3. #3
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    3,311
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Help with a Terminal Command

    Usually ll is short for ls -l. An alias indeed.

  4. #4
    Join Date
    Apr 2010
    Location
    Wasteland, USA
    Beans
    Hidden!
    Distro
    Kubuntu 13.10 Saucy Salamander

    Re: Help with a Terminal Command

    Thanks for the responses, I appreciate it!

    Seems like enough commands are already "abbreviated" to an obfuscating degree... and now your telling me some of them also have aliases? *facepalm*
    It's UBUNTASTIC!
    -Custom Built Box Ubuntu 12.04 & Windows 7 dual boot: AMD-fx6300 3.5 GHz, Asrock 990FX Extreme4, Radeon HD7870, Ares 1600 Ram, Samsung EVO SSD, Momentus Hybrid HDD.
    -Thinkpad T500: KDE-Ubuntu 13.10 & Windows 7 dual boot

  5. #5
    Join Date
    Sep 2010
    Beans
    898

    Re: Help with a Terminal Command

    Another piece of trivia is that "ll" is not always defined. If you "ssh" to a remote server, sometimes you have to tediously type the full "ls -l".

  6. #6
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Help with a Terminal Command

    Quote Originally Posted by dave2001 View Post
    ... and now your telling me some of them also have aliases?
    ...well... they exist strictly for the user's benefit. You don't have to use them.

    Short history:

    *nix programmers are a lazy lot (lazy like a fox), so whenever possible, they invent shortcuts that can cut keystrokes. Aliases are an example of this sort of constructive laziness. Instead of having to type ls -l all the time, an alias is defined (only in some distros) so that a simple ll substitutes for ls -l. Admittedly, this specific alias is a rather lame one, but the following one may make a little more sense. I run a multitude of VMs in VirtualBox and must often check their virtual driver version with the command:
    Code:
    modinfo vboxguest | grep -iw version
    By defining the alias vbinf for this string of commands, I not only save a lot of keystrokes, but also the need to remember the exact command string for something I don't use that frequently. For really long convoluted command strings, it's a godsend.

  7. #7
    Join Date
    Feb 2008
    Location
    Pelican Bay Correctional
    Beans
    Hidden!

    Re: Help with a Terminal Command

    Code:
    type -f ll
    or
    Code:
    alias ll
    If you want things you've never had, you have to do things you've never done.

  8. #8
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    6,076
    Distro
    Xubuntu

    Re: Help with a Terminal Command

    Just enter the command alias to see all the aliases currently defined.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •