Can anyone tell me how I can undo a sudo rm -r /var/run
mistake?
I am unable to use sftp and mysql now.
mkdir /var/run
chmod 755 /var/run
that will fix most things, anything that still doesn’t work will just need to be restarted
edit: restarted as in, /etc/init.d/ssh restart
which will recreate /var/run/sshd. you may have some issues with the pid files being missing, nothing a manual pkill won’t fix.
Check more discussion of this question.