LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux 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!

Notices


Reply
  Search this Thread
Old 11-19-2010, 12:23 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,485

Rep: Reputation: 51
LFH: what file to alias a command in, at boot time?


kernel 2.6.21.5, Slackware 12.0
bash 3.1.17

Hi:
In what file, within the LFH (Linux file hierarchy) may I place an alias? That is, I placed the line
Code:
 alias ji=/bin/ls
, in /etc/rc.d/rc.local, just to make a try. Then I rebooted, and when I typed the alias, bash did not recognize it. Any hint would be welcome.
 
Old 11-19-2010, 02:09 PM   #2
wpeckham
Senior Member
 
Registered: Apr 2010
Location: USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 1,656

Rep: Reputation: 580Reputation: 580Reputation: 580Reputation: 580Reputation: 580Reputation: 580
alias

command alias is not done at boot time, it is done at login time.

If for everyone on the box, try entering it in the /etc/profile file.

IF just for one user, use the ~/.bash_profile file.

NOTE: this assumes a BASH shell system. Check the MAN page for your default and standard user shells.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to capture elapsed time for a file copy command SteveInTallyFL Linux - Newbie 3 01-25-2010 02:08 PM
How to find time system takes to boot using command sumeet inani Linux - Newbie 12 12-15-2009 03:25 AM
Wildcard email alias in /etc/alias file custangro Linux - Enterprise 1 10-02-2009 01:17 PM
Any command to check the creation time of a file? ashu_linux Linux - Newbie 5 05-12-2009 10:36 AM
tar command will only do one file at a time Travis86 Linux - Newbie 4 03-15-2003 08:27 AM


All times are GMT -5. The time now is 04:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration