Find the answer to your Linux question:
Results 1 to 3 of 3
Hello, I can make aliases fine by editing the .bashrc file in my home directory, but the first thing I do when I open a terminal window is sudo su ...
  1. #1
    Just Joined! FOCACCIO's Avatar
    Join Date
    May 2010
    Location
    San Diego
    Posts
    2

    [SOLVED] Aliases for SU

    Hello,

    I can make aliases fine by editing the .bashrc file in my home directory, but the first thing I do when I open a terminal window is sudo su so I don't have to type sudo in front of every command. The problem is, I am then not able to use my aliases. How can I make aliases that work after I run the sudo su command?

    Thanks,
    Greg

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,281
    Instead of using 'sudo su' try 'sudo <shell>' replacing the '<shell>' with what ever shell you use.
    For example I use bash so i type in 'sudo bash'.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined! FOCACCIO's Avatar
    Join Date
    May 2010
    Location
    San Diego
    Posts
    2
    Thank you Lazydog, that works perfectly!
    I am now able to use the aliases I create in .bashrc

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...