- Listagem de discos
fdisk -l
- Seleciona o disco, n - nova particao, w - escreve e sai
fdisk
sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z" |
# run command with root user | |
curl -fsSL https://get.docker.com/ | sh | |
# add user with group docker | |
sudo usermod -aG docker $USER |
# install git-filter-repo | |
sudo python3 -m pip install --user git-filter-repo | |
# add filter-repo in path for exec lib | |
export PATH="/root/.local/bin:$PATH" | |
# filter path (or file) in local repository | |
git filter-repo --invert-paths --path <path> --force |
[Unit] | |
Description=Regenerate SSH host keys | |
Before=ssh.service | |
ConditionFileIsExecutable=/usr/bin/ssh-keygen | |
[Service] | |
Type=oneshot | |
ExecStartPre=-/bin/dd if=/dev/hwrng of=/dev/urandom count=1 bs=4096 | |
ExecStartPre=-/bin/sh -c "/bin/rm -f -v /etc/ssh/ssh_host_*_key*" | |
ExecStart=/usr/bin/ssh-keygen -A -v |
docker stop $(docker ps -aq) && \ | |
docker rm -f $(docker ps -aq) && \ | |
docker volume rm $(docker volume ls -q) && \ | |
docker rmi -f $(docker image ls -aq) |
sudo apt-get update -y -qq | |
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y -qq | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo apt-get update -y -qq && sudo apt-get install docker-ce docker-ce-cli containerd.io -y -qq | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose |
show full processlist; |