Announcement

Collapse
No announcement yet.

change alias status of "l" command

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    change alias status of "l" command

    The command "type l" (that's lowercase L) reveals that I currently have l aliased to `ls -CF'

    I want l to be aliased to "ls -hl" instead. How do I go about that? I've never used aliases or symlinks before.


    Sorry about the comic sans, but I thought that the default way that a lowercase L was printed was too confusing in the default font.
    I run Kubuntu 18.04 LTS.

    #2
    I'm assuming you are using bash (the default interactive shell of *buntus), in which case that alias is set in ~/.bashrc.

    You can edit the file to change the alias, or you can put your own aliases in a separate file ~/.bash_aliases which ~/.bashrc will source if it exists.

    To make the new alias active you need to restart the shell or run the command "source ~/.bashrc".

    Note: aliases set in .bashrc are per user (as every user has their own .bashrc).

    Comment


      #3
      Thanks, kubicle! That works perfectly. It worked even without running source ~/.bashrc.
      I run Kubuntu 18.04 LTS.

      Comment


        #4
        Originally posted by rybnik View Post
        It worked even without running source ~/.bashrc.
        Perhaps you started the shell *after* you edited .bashrc?

        Editing .bashrc (or .bash_aliases) won't affect currently running shells (without resourcing .bashrc). It will affect new shells as .bashrc is sourced automatically during shell initialization.

        Comment


          #5
          Originally posted by kubicle
          Perhaps you started the shell *after* you edited .bashrc?
          Yes.
          I run Kubuntu 18.04 LTS.

          Comment


            #6
            For the configuration that I specified, ~/.bashrc should contain the following line

            Code:
            alias l='ls -hl'
            By default, the RHS of alias l will have something else.

            -------------------------------------------------------------------------------------------

            In openSUSE, by default, l is aliased to `ls -alF'

            ----------------------------------------

            meanings of options:

            -F: append indicator (one of */=>@|) to entries
            -a: don't ignore stuff that begins with a period

            -h: print human readable sizes (e.g., 1K 234M 2G)
            -l: vertical (long) listing format
            Last edited by rybnik; Aug 21, 2015, 12:51 PM. Reason: added "meanings of options"
            I run Kubuntu 18.04 LTS.

            Comment


              #7
              for some more on this ,,,,,,,

              https://www.kubuntuforums.net/showth...t=bash+aliases

              https://www.kubuntuforums.net/showth...t=bash+aliases

              VINNY
              i7 4core HT 8MB L3 2.9GHz
              16GB RAM
              Nvidia GTX 860M 4GB RAM 1152 cuda cores

              Comment

              Working...
              X