Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Originally posted by alaios Xmm... I have execute your command as root... The problem is that the ll command is not useable from the other users...
Because when you create an alias at the command as a user, its only for that user for that session.. you'll need to setup this alias in each users .bash_profile, .bashrc or the /etc/profile so everyone uses that alias upon login..
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/\$ '
alias ls='ls --color'
alias l.='ls -a'
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...
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.