Shell Commands!
Alias
- Create alias:
alias la='ls -l -a --color=auto'
File Commands
- More info:
ls -F
- Show hidden:
ls -a
- Long Listing auto color:
ls -l -a --color=auto
Dir Commands
- List contents of dir:
ls
- Create Dir:
mkdir mydir
SSH
Add New Key
For conversion or working with putty https://askubuntu.com/questions/818929/login-ssh-with-ppk-file-on-ubuntu-terminal
- Generate key:
ssh-keygen -t rsa -b 4096
- Copy to .ssh:
mv <filename> /home/ubuntu/.ssh
- Start ssh agent:
eval $(ssh-agent -s)
- Linux Permission:
chmod 600 ~/.ssh/<your private key>
This allow necessary permissions and you can still edit if necessary. - Add key:
ssh-add <youkeyfile>
Misc
- Last Arg:
!$
- Read Env or shell var:
echo $PATH
wherer PATH is the var name.
Functions
- Set Function:
function set {}
Bash
- Clear screen:
clear
- Read input:
read VAR_NAME
then use the variable