Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 6788  / 2 Years ago, tue, june 21, 2022, 11:59:49

I've dug around forums trying to find a way to get rid of some default items in my path, but to no avail. Here is what it gives right now:



/home/blaine/.rvm/gems/ruby-2.0.0-p247/bin:/home/blaine/.rvm/gems/ruby-2.0.0-p247@global/bin:/home/blaine/.rvm/rubies/ruby-2.0.0-p247/bin:/home/blaine/.rvm/bin:/home/blaine/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games


And the offending items are the the two with games in them:



:/usr/games:/usr/local/games


neither of which I use, but that really isn't the core of my question. I want to get rid of these items (and to know how to do similarly in the future), but I can't find where these defaults are being set. There's no mention of PATH when I grep these files:



/etc/profile
/etc/profile.d/*
~/.bashrc
~/.bash_profile


I'm using Ubuntu 13.04


More From » 13.04

 Answers
1

The PATH is set up in /etc/environment file, but if you want to remove some items from it, better to do this in your ~/.bashrc file. So, if you want to remove /usr/games and /usr/local/games directories, set up again the PATH like this:



PATH="/home/blaine/.rvm/gems/ruby-2.0.0-p247/bin:/home/blaine/.rvm/gems/ruby-2.0.0-p247@global/bin:/home/blaine/.rvm/rubies/ruby-2.0.0-p247/bin:/home/blaine/.rvm/bin:/home/blaine/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

[#29438] Tuesday, June 21, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
naldis

Total Points: 257
Total Questions: 101
Total Answers: 111

Location: Kenya
Member since Sat, Feb 25, 2023
1 Year ago
;