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 trying to run

sudo rm -r ./tmp

but instead typed

sudo rm -r /tmp

Will it be fixed by running?

sudo mkdir /tmp

if i do what permissions should i give it?

ps: i didnt log out of my system yet

share|improve this question

2 Answers 2

up vote 7 down vote accepted

I can't think of a reason why this shouldn't work. On my system, the permissions are set by:

sudo chmod 1777 /tmp

(drwxrwxrwxt)

share|improve this answer
    
I rebooted my system after deleting the /tmp folder and now it is not getting past lightdm. –  Juzer Ali Dec 5 '12 at 4:49

You should run the following commands to restore the tmp folder.

sudo -i
# You now have a root prompt and do not need to continue typing sudo
mkdir /tmp
chmod 1777 /tmp
exit

Then you sould be all good

share|improve this answer
1  
I think that exiting the root prompt after the steps would be worth mentioning. –  zxcdw Aug 22 '12 at 0:34

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.