ls -l ==> ll
Hi! I want to know how i can create aliases useful for all the uses and only for the curent user..
I want when a user writes ll the ls -l command to be executed |
alias ll="ls -l"
|
Xmm... I have execute your command as root... The problem is that the ll command is not useable from the other users...
|
Quote:
|
Thz
Thx for your repl...
I have entered the following line in the /etc/profile alias ll="ls -l" This command is ok from root but the normal users can't find it |
Create a text file called .bashrc in the home directory of the user and add the aliases to that
Here is mine, I have a different prompt to remind me if I am user or root, plus a couple of aliases for ls: Code:
PS1='\u@\w/\$ ' HTH mark |
thx
Thx....for your reply but some questions....
What PS1 m,eans??? I know about bashrc but this works only for the users that have that file.... I am trying to find a way for doing that and every user can use them... |
PS1 stores the variable that is used to construct the bash prompt. Perhaps you could tell us which distro you are using.
|
debian 3
|
take a look at your /etc/profile. you should have a line in there that looks something like this.
PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:$HOME/.bash_profile" what i've done with mine is to add the $HOME/.bash_profile so that i can declare other user specific things in my ~/.bashrc. this will also make it so that others can change their aliases how they would want them to work. if you want things set up for the entire system, all of the users, put it in /etc/bash.bashrc, the aliases that is. for my ll, i have ls=ls -lh, this makes it human readable. it's not that big of a deal, but it's nice to have. another couple are la= ls -A, and l= -lA. cheers. |
All times are GMT -5. The time now is 08:30 PM. |