LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-19-2017, 05:12 AM   #1
sagxam
LQ Newbie
 
Registered: Dec 2016
Posts: 14
Blog Entries: 1

Rep: Reputation: Disabled
Unhappy Basic commands not working


Every time i reboot my computer i and log in as su on the terminal basic commands such as : ls , cd , apt-get , etc don't work.
i have tried this online solution
root@debian:/home/sag# export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
But this works only till the terminal is open, when i restart the terminal again the above command needs to be typed.
 
Old 02-19-2017, 11:43 AM   #2
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Is PATH defined in /etc/profile or /etc/environment (if exists)? If it is and your PATH doesn't by default match that, then you have possibly reset PATH somewhere else...
 
Old 02-19-2017, 12:00 PM   #3
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Xubuntu
Posts: 5,444

Rep: Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897
This is useful
http://stackoverflow.com/questions/1...-path-on-linux

The files /etc/profile or /etc/environment set things on a systemwide basis. You can also have custom paths set for different users, as in /root/.bash_profile or $home/.bash_profile
 
1 members found this post helpful.
Old 02-19-2017, 12:03 PM   #4
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Originally Posted by DavidMcCann View Post
This is useful
http://stackoverflow.com/questions/1...-path-on-linux

The files /etc/profile or /etc/environment set things on a systemwide basis. You can also have custom paths set for different users, as in /root/.bash_profile or $home/.bash_profile
These assume BASH is in use, which hasn't been confirmed yet.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
After installing RHEL 4th version.Some Basic commands is not working. ymr_raghu Linux - Newbie 2 11-12-2008 03:33 AM
Basic Commands Instantly Linux - Newbie 2 06-29-2007 05:03 PM
looking for basic commands etc? lchisholm SUSE / openSUSE 4 05-03-2007 01:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:38 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration