![]() |
How to make aliases ?
Hi,
I'm a beginner in command line and I'm a bit lost with Maemo's shell : I'd like to create basic aliases for my N900 (alias ll = 'ls -l', that kind of stuff). Apparently the default shell doesn't have a .bashrc, so I don't know where to put my aliases. How to apply the changes afterwards, too ? (sounds like there isn't "source" either) Thanks |
Re: How to make aliases ?
Quote:
In a terminal, type: Code:
echo 'alias ll="ls -l"' > /home/user/.profile Code:
source /home/user/.profile |
Re: How to make aliases ?
Thanks, it works !
I had found a thread in which it was told .profile was supposed to be an equivalent to .bashrc (I wasn't sure it worked for aliases though), but I couldn't source it with "source .profile". "source /home/user/.profile" works though, I guess it was just the path that was required (I just tested with ./.profile, it works too). |
Re: How to make aliases ?
The above instructions seem like they only apply to the current xterm session, all new sessions need "source /home/user/.profile" run each time to see all aliases.
Does anyone have any ideas? |
Re: How to make aliases ?
I prefer to use vi to create the file, but it seemed to work for me.
You could also use leafpad if you have it installed. You would go to the /home/user directory You would type vi .profile and hit enter after the vi editor opened you would type the letter i then you would type the alias line you wanted then you would type the esc key then you would type :wq and hit enter then you would be thru. close the xterm, reopen it and see if it works. |
Re: How to make aliases ?
Quote:
|
Re: How to make aliases ?
Warning: a bogus .profile can render the device non-bootable so be very very careful when editing it, and make sure you have a recent backup in case you need to reflash.
|
Re: How to make aliases ?
Quote:
talk maemo... Thanks again. |
Re: How to make aliases ?
Quote:
|
All times are GMT. The time now is 06:13. |
vBulletin® Version 3.8.8