Here are some tips and notes on programming.
docker pull ubuntu:latest
docker run -it --privileged=true -p 50022:22 --name ubuntu ubuntu bash
apt-get update
apt-get install vim
apt-get install git
apt-get install net-tools
apt-get install openssh-server
echo "Port 22" >>/etc/ssh/sshd_config
echo "PermitRootLogin yes" >>/etc/ssh/sshd_config
service ssh start
service ssh status
systemctl enable ssh
echo "#!/bin/bash" >> ssh_auto_start.sh
echo "service ssh start" >> ssh_auto_start.sh
echo "service ssh status" >> ssh_auto_start.sh
chmod 755 ~/ssh_auto_start.sh
echo "~/ssh_auto_start.sh" >> /root/.bashrc
passwd
ssh [email protected] -p 50022
- Other target
ipconfig # use this command e.g. 192.168.1.xxx
ssh -p 50022 [email protected]
- IP address: 192.168.1.99
- Subnet mask: 255.255.255.0
- Gateway: 192.168.1.1
- DNS server: 8.8.8.8
ssh-keygen -t rsa -b 4096 -C "[email protected]"
cat /root/.ssh/id_rsa.pub
if clang-format --version &> /dev/null
then
clang-format -style=WebKit -i main.cc
clang-format -style=WebKit -i example.cc
fi
// clang-format -style=file -i activations.h