Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I was installing rvm

and for some reasons i changed first line on root's .bashrc what was there?

i inserter if [[ -n "$PS1" ]]; then and see that i'm root, can't undo... What string is first like if... in Ubuntu 12.04 for root?

share|improve this question
add comment

1 Answer 1

I'm not awfully clear on what you've done & why, but I believe this is what you're asking for (NB: taken from 12.10 - it should be similar):

ace@ace2:~/src$ sudo head -n 20 /root/.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.