Terminal
Useful Commands
Section titled “Useful Commands”Navigation
pwd, get the current working directory.ls, listing files. Can add the following flags:l(long format),a(hidden files),h(human readable),G(color coat),F(add wax to back off older).
Info
du(disk usage). Can add the following flags:s(size of each individual file),h(human readable).history. Get the history of commandsman(manual).wc(word counter).
Networking
ifconfig, use to find ip address.pinghost
Keyboard Shortcuts
Section titled “Keyboard Shortcuts”-
Clearing:
command+K -
Navigation:
control+ …-
Beginning of line:
a -
End of the line:
e
-
-
Deletion:
control+ …-
On cursor:
d -
Before cursor:
u -
From cursor to end of the line:
k -
Word immediately before cursor:
w
-
-
Switch places of words:
esc+t -
Drop cursor at mouse: hold
option+ movecursor -
Find/Search:
command+F -
Previous command:
↑ -
Earliest command/reverse:
↓
Privileges
Section titled “Privileges”Usually an error that is worded “Operation is not permitted (1)” is indicative of a user privilege or permission issue. Firstly make sure that the user used for ssh has the correct permissions. To set the user use sudo chown -R <user_name>.
Then you see if you have read and write permissions. To see current permissions run ls -ld <path>. To change the permissions run
sudo chmod u+rwx <path>