LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-01-2003, 03:04 PM   #1
spuppett
Member
 
Registered: Feb 2003
Posts: 47

Rep: Reputation: 15
root question


I made an alias in my .bashrc file for ls. really simple, its lst="ls -l". works like it should. when i am root it doesn't work, that makes sense, but is there a place where I can do something similar for root, or do i need to make it a script?

Thanks.
 
Old 03-01-2003, 03:10 PM   #2
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Edit the /root/.bashrc file

Each user has one in their home directory. Here is mine
Code:
# fancypiper ./.bashrc for user phil
# User specific aliases and functions

alias x='dial ; fetchmail ; startx'

# Become full root
alias god='su -'

# Alter the ls command
alias ls='ls -a'
alias lls='ls -la'

# Connect/disconnect the internet by modem
alias dial='/sbin/ifup ppp0'
alias hangup='/sbin/ifdown ppp0'

# Launch links with my linux links page
alias links='links /home/phil/bookmarks.html'

# Power down/reboot
alias off='shutdown -h now'
alias boot='shutdown -r now'

# For Redhat editor because I forget which one I use in which distro
alias pico='pico -w'
alias nano='pico -w'

# For Gentoo editor because I forget which one I use in which distro
# alias pico='nano -w'
# alias nano='nano -w'

# This script needs to be on the bottom of the file or RH updates will fsck it up
# Source global definitions
if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi

Last edited by fancypiper; 03-01-2003 at 03:13 PM.
 
Old 03-01-2003, 03:17 PM   #3
spuppett
Member
 
Registered: Feb 2003
Posts: 47

Original Poster
Rep: Reputation: 15
Thanks, I thought there would be something like that. I thought I looked, but I guess i looked in the wrong spot? As soon as I get my other problem fixed, i'll try that.
 
Old 03-01-2003, 03:37 PM   #4
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Just a little FYI here. If you want the alias to be available to ALL users on the machine then you could add the alias line to the bottom of the /etc/bashrc file assuming you are using bash.

By the way I like some of your alias Fancypiper. Can I use some of those or do I need to pay for a product key to use those?
 
Old 03-01-2003, 05:18 PM   #5
spuppett
Member
 
Registered: Feb 2003
Posts: 47

Original Poster
Rep: Reputation: 15
Thank you much. I knew it was just something I was overlooking.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
root question manicman Linux - Newbie 2 11-03-2005 04:20 AM
root question. ratatat Linux - Newbie 7 12-27-2004 02:57 PM
Root question RockmanExe Mandriva 5 08-29-2003 03:43 PM
root question Xris718 Linux - General 6 07-15-2003 02:25 AM
root question? indy317 Linux - General 5 05-20-2003 03:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:12 AM.

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
Open Source Consulting | Domain Registration