# Linux Advance

# /lib has been moved accidentally

### **How to run all the commands in /bin and /usr/bin if the /lib has been moved accidentally**

#### Scenario:

The /lib has been moved to /lib.old

If this has been done, all the commands like mv, ls and all that are in /bin and /usr/bin will not work since the /lib is needed

To resolve this and move back the /lib.old to /lib perform the following.

<p class="callout success">export LD\_LIBRARY\_PATH=/lib.old:/lib.old/x86\_64-linux-gnu</p>

<p class="callout success">/lib.old/x86\_64-linux-gnu/ld-linux-x86-64.so.2 /bin/mv /lib.old /lib  
</p>