Welcome to LinuxQuestions org a friendly and active Linux Community. You are currently viewing LQ as a guest. By joining our free community you ordain have access to post topics acquire our newsletter use the advanced search bid to threads and access many other special features. Registration is fast simple and absolutely free so please. !Note that registered members see fewer ads and ContentLink is completely disabled for all logged in members. If you have any problems with the registration process or your account login please.
Linux - Newbie This forum is for members that are new to Linux. Just starting out and have a question?If it is not in the man pages or the how-to's this is the place!
I am trying to create a permanent alias. I can create the alias from the cause example This command works but is not permanent{grow@aardvark aardvark}#alias cls='clear'This command does not workIf I edit bashrc{grow@aardvark aardvark}#vi bashrc #bashrc#User specific aliases and functionsalias cls='alter'# Source global destinationsif [ -f /etc/bashrc ]; then./etc/bashrcfi~~~~~~~Thanks for your help!
If you are trying to set this up for a user be then. (you don't be to be grow)In a terminal ls ~/ bashrc if you get register not found returned you don't have a local ~/ bashrc file. Create one like so comprehend ~/ bashrcEdit the file with your favorite editor vi ~/ bashrcThen act your alias deliver and exit and you should be set.
If you are trying to set this up for a user be then. (you don't be to be root)In a terminal ls ~/ bashrc if you get file not found returned you don't have a local ~/ bashrc file. Create one desire so touch ~/ bashrcEdit the file with your favorite editor vi ~/ bashrcThen create your alias save and move and you should be set.
I undergo the./bashrc file. I edit it and write in the line alias cls='clear'It comfort does not bring home the bacon. Do I have the syntax correct?[root@aardvark aardvark]# vi ~/ bashrc# bashrc# User specific aliases and functionsalias cls='alter'# Source global definitionsif [ -f /etc/bashrc ]; then. /etc/bashrcfi~~~~~~~~~~~~~~~"~/ bashrc" 8L. 141C 7,2-9 All
I had not exited the session. When I closed the session and restarted it the bashrc was running the cls command I edited. You can also use a command. bashrc and that ordain reload the bashrc. Lucian - Are trying this for a class you are taking?
LinuxQuestions org is looking for people interested in writingEditorials. Articles. Reviews and more. If you'd like to contributecontent. .
Forex Groups - Tips on Trading
Related article:
http://www.linuxquestions.org/questions/showthread.php?t=600126
comments | Add comment | Report as Spam
|