If you Not able to do anything with your terminal or get error like below. your files system permission are broken.
Open Disk Utility
Select OSX installation drive form left side and click on button “Repair Disk Permissions”
Once process finished you will be able to access Terminal.