Terminal window not working

Asked by raytonvision

Hi friends
 one of my friends machine may have been hacked can someone help us fix this as he needs it urgently for important work
Her command terminal is not working and none of the basice commands work the following is the output when opning the terminal
this is only for one user account the other user account are fine :-
bash: uname: command not found
bash: [: too many arguments
bash: [: too many arguments
bash: [: too many arguments
bash: [: too many arguments
bash: [: too many arguments
bash: [: too many arguments
bash: [: too many arguments
bash: [: too many arguments
bash: [: too many arguments
bash: [: too many arguments
bash: [: too many arguments
bash: [: too many arguments
bash: [: too many arguments
bash: [: too many arguments
bash: [: too many arguments
bash: [: too many arguments
bash: [: too many arguments
bash: [: too many arguments
bash: [: too many arguments
bash: [: too many arguments
bash: [: too many arguments
bash: [: too many arguments
bash: sed: command not found
bash: complete: is: no completion specification
bash: complete: not: no completion specification
bash: complete: included: no completion specification
bash: complete: in: no completion specification
bash: complete: the: no completion specification
bash: complete: PATH: no completion specification
bash: complete: environment: no completion specification
bash: complete: variable.: no completion specification
dim@kim:~$ ls
Command 'ls' is available in '/bin/ls'
The command could not be located because '/bin' is not included in the PATH environment variable.
bash: ls: command not found
dim@kim:/bin$ cd ../usr
dim@kim:/usr$ ls
Command 'ls' is available in '/bin/ls'
The command could not be located because '/bin' is not included in the PATH environment variable.
bash: ls: command not found
dim@kim:/usr$

Please can some one help us fix this , please can you let me know the steps to fix her laptop

Thanks

Kim

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Steven Danna
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Jon Charge (seropith) said :
#1

Try to set back the default path variable. Let me know if that helps.

Revision history for this message
raytonvision (raytonvision) said :
#2

how do i set the default path variable ? sorry we are very new to this please could you explain the steps
thanks

Revision history for this message
raytonvision (raytonvision) said :
#3

how do i set the default path variable ? sorry we are very new to this please could you explain the steps
thanks

Revision history for this message
raytonvision (raytonvision) said :
#4

Hi Jon

I have tried to add the following command path as it was showing a different path for me.

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin

it works for the current terminal window where export path is added. but, when restarted, it still doesn't work. I have tried the "bash -l" to effectively run it in bash. when doing so, it reverts to the original form of the above problem.

I have tried to edit the vi ~/.bashrc but i am unable to open this file. Any idea please??

thanks and eagerly anticipating for your reply.

Also any help from anybody is much appreciated.

thanks

Revision history for this message
Steven Danna (ssd7) said :
#5

The default path variable for all users is set in /etc/enviroment. You can try to edit it my doing the following:

sudo nano /etc/enviroment

make sure the first line reads something like:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"

Also, what error does it give you when you try to open ~/.bashrc?

Revision history for this message
Best Steven Danna (ssd7) said :
#6

Sorry. Typo. The file to edit is

/etc/environment

Revision history for this message
raytonvision (raytonvision) said :
#7

Thanks Steven Danna, that solved my question.