Thread: command line alias remove for linux

  1. #1
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385

    command line alias remove for linux

    Hello,

    Ive added an alias using command line alias aliasName='command' , using alias gives a full list as expected but how do i remove an alias from the command line. There is no associated man page and appears to be no --help switch i have tried alias -r aliasName (which seemed logical to me) doesnt remove the assocated alias. Can anyone advise me on how to do this?

    [using slackware 10]

    Thanks
    Monday - what a way to spend a seventh of your life

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Try 'unalias'.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  3. #3
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    well, i went to try my new found knowledge and found that my aliases no longer exist. I started a new console, added the alias, tested it - it worked. opened a new console typed alias and found my new defined alias had gone.

    The alias i add seem to only apply to the current console, i tried adding the alias logged in as root but get the same problem.

    how do i make the alias permanent?
    Monday - what a way to spend a seventh of your life

  4. #4
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    What shell are you using?
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  5. #5
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    sorry... bash
    Monday - what a way to spend a seventh of your life

  6. #6
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Quote Originally Posted by XSquared
    What shell are you using?
    im just gonna guess bash and say..

    open up your ~/.bashrc and define your alias' there.

  7. #7
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    aahh
    i had looked for a similar file - i had searched for .cshrc (though, i think i flicked to unix mode for a second there as it doesnt appear to exist). Thanks, i will try that when i get home
    Monday - what a way to spend a seventh of your life

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Running remove() gets permission denied error...
    By edomingox in forum C Programming
    Replies: 4
    Last Post: 01-11-2009, 12:55 PM
  2. randomly remove elements
    By joan in forum C++ Programming
    Replies: 6
    Last Post: 12-06-2006, 01:46 PM
  3. randomly remove elements
    By joan in forum C++ Programming
    Replies: 2
    Last Post: 12-06-2006, 12:22 PM
  4. [MFC] Remove(), DelteFile(), _unlink nothing works
    By JoJo in forum Windows Programming
    Replies: 2
    Last Post: 05-10-2003, 07:07 AM
  5. Alias...
    By Cheeze-It in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 10-01-2001, 04:25 PM