ssh-keygen -t rsa
mkdir .ssh
sudo chmod 700 .ssh
vim authorized_keys
- place the ssh pub key of machine
sudo chmod 0600 authorized_keys
https://www.digitalocean.com/community/tutorials/how-to-create-a-sudo-user-on-ubuntu-quickstart
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ '
fi
sudo service <service name> start
sudo service <service name> stop
sudo chown root:root /etc/postfix/sasl/sasl_passwd /etc/postfix/sasl/sasl_passwd.db
sudo chmod 0600 /etc/postfix/sasl/sasl_passwd /etc/postfix/sasl/sasl_passwd.db
sudo iptables -I INPUT -p tcp --dport 3000 -jACCEPT
sudo su
ps aux | grep <process name>
ps -ef | grep <process name>
kill -9 <process name>
ifconfig
nohup python <fine_name.py> &
tail -f nohup.out
nohup java -jar target/<filename>.jar >/dev/null 2>&1 &
ssh <username>@<ip-address> -i <example.pem>
scp -i <pem file> <username>@<ip-address>:<source/file/path> <destination/file/path>
chmod 777 -R <directory/filename>
chmod +x <filename>
sudo netstat -ntpl