Editing shell setup files safely

Editing the .bashrc, .bash_profile, .bash_login files incorrectly can permanently ban you from the system, making it difficult to login and rectify the mistake.

A very useful strategy in editing these files is:

nano .bashrc

su – “your_username”

# there might be an error

logout

# rectify error

Here you can use rlogin, telnet or su command to login into your account, and then safely return to your own shell after a logout.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: