Page 1 of 5 123 ... LastLast
Results 1 to 10 of 50

Thread: do you have any good aliases you can share?

  1. #1
    Join Date
    Aug 2005
    Beans
    462

    do you have any good aliases you can share?

    if you are like me - a newbie here's a description of an alias from here
    alias - an alternate name or abbreviation (usually short and easy to remember) that substitutes for a pathname, command, list, or expression (usually long and hard to remember).
    i think to get it working you have to do this
    Code:
    gedit .bashrc
    then uncomment these lines
    Code:
    #if [ -f ~/.bash_aliases ]; then
    #   . ~/.bash_aliases
    #fi
    i think that's how they look to start with, anyway they should look like this when you have finished and saved the file
    Code:
    if [ -f ~/.bash_aliases ]; then
        . ~/.bash_aliases
    fi
    then create or make sure you have this file in your home directory
    Code:
    .bash_aliases
    you can check by doing this when you first open bash, or your commmand line program
    Code:
    ls -a
    if it's not there just make the file
    Code:
    gedit .bash_aliases
    lol, i only wanted to ask if anyone could show me some good aliases not write a tutorial i hope someone shows me some now thanks.

    if everything i have written is correct and there isn't already a tutorial about enabling aliases and there's no easier way maybe i'll submit as a howto.
    Thanks to the forums staff for your dedication and hard work
    (the admins changed my sig to that lol )

  2. #2
    Join Date
    May 2005
    Beans
    Hidden!

    Re: do you have any good aliases you can share?

    Here are mine:

    alias x='gksudo gedit /etc/X11/xorg.conf'
    alias upgrade='sudo apt-get update && sudo apt-get dist-upgrade'
    alias apt='gksudo gedit /etc/apt/sources.list'

  3. #3
    Join Date
    Jan 2006
    Location
    Philadelphia
    Beans
    4,068
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: do you have any good aliases you can share?

    Quote Originally Posted by dabear
    Here are mine:
    hehe, dabear, how often do you dist-upgrade that you decided to make an alias for it?

    anyway, here are mine:
    Code:
    alias ll='ls -al --color=auto'
    alias mv='mv -i'
    alias cp='cp -i'
    alias rm='rm -i'
    nothing fancy... just to make sure that mv/cp/rm ask confirmation (unless overridden specifically), and a shortcut for long-listing for ls.
    the ones by dabear are nice, but i dont edit my xorg.conf, or sources.list so frequently that i need an alias for them.

  4. #4
    Join Date
    Nov 2005
    Location
    Toronto
    Beans
    1,181

    Re: do you have any good aliases you can share?

    alias upgrade='sudo apt-get update && sudo apt-get dist-upgrade'
    Good one!
    But I mean no harm nor put fault
    On anyone that lives in a vault
    But it's alright, Ma, if I can't please him.

  5. #5
    Join Date
    Aug 2005
    Beans
    462

    Re: do you have any good aliases you can share?

    thanks, everyone d(-_^) i hope people keep posting because i think even if no one uses anyone elses aliases, you can still learn just from seeing how people use their computer.

    i don't understand why dabear uses gksudo for this one, can anyone explain why it's used instead of sudo? thanks everyone
    Code:
    alias apt='gksudo gedit /etc/apt/sources.list'
    Thanks to the forums staff for your dedication and hard work
    (the admins changed my sig to that lol )

  6. #6
    Join Date
    Dec 2005
    Location
    Wrocław/Poland
    Beans
    83
    Distro
    Ubuntu 6.10 Edgy

    Re: do you have any good aliases you can share?

    AFAIK the only difference here is that gksudo will ask for a password in a nice GTK+ window
    Intelligence is like a river: the deeper it is, the less noise it makes.

  7. #7
    Join Date
    Nov 2005
    Beans
    146

    Re: do you have any good aliases you can share?

    I don't have any fancy ones, just shortcuts for getting to my frequently used directories.

    alias d='cd /home/myusername/Downloads'
    alias p='cd /home/myusername/Pics'
    alias s='cd /home/myusername/School'
    Killed my Edgy/XP dual-boot for now, moved to Vista. So far, so good.
    Cool Links: DAPreview (MP3 Player News & Reviews) | Deadspin (Sports news with a twist)

  8. #8
    Join Date
    Mar 2006
    Location
    Bucharest
    Beans
    604

    Re: do you have any good aliases you can share?

    Quote Originally Posted by pitkali
    AFAIK the only difference here is that gksudo will ask for a password in a nice GTK+ window
    Here is what Wiki says about this:

    NEVER use sudo to start graphical programs. You should always use gksudo or kdesu to run such programs, otherwise new login attempts may fail. If this happens and at login an error message reports: "Unable to read ICE authority file", log in using the failsafe terminal and execute the command below substituting user for your username.

  9. #9
    Join Date
    Mar 2006
    Location
    Bucharest
    Beans
    604

    Re: do you have any good aliases you can share?

    Oh, and btw, I uncommented the lines in .bashrc, I made a new file called .bash_aliases and entered this line:
    Code:
    alias x='gedit /etc/X11/xorg.conf
    However when I type "x" in the terminal it says "command not found". What am I doing wrong?

  10. #10
    Join Date
    Oct 2005
    Location
    Dallas
    Beans
    620
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: do you have any good aliases you can share?

    Code:
    alias ls='ls -p'
    alias ll='ls -lahp'
    alias inkscapeprint='inkscape -p Deskjet-3650'
    I love my ll alias. Not only does it print long listings, but it also prints sizes in human readable format (1K instead of 1024), and it adds a / at the end of directories.

Page 1 of 5 123 ... LastLast

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
  •