Create template from a vm: Difference between revisions
No edit summary |
No edit summary |
||
| Line 5: | Line 5: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
echo "" > ~/.bash_history | echo "" > ~/.bash_history | ||
rm ~/.Xauthority | rm ~/.Xauthority | ||
| Line 25: | Line 24: | ||
rm ~/.Xauthority | rm ~/.Xauthority | ||
history -c | history -c | ||
sudo shutdown | sudo shutdown | ||
exit | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 10:10, 29 August 2024
1. Execute as root:
echo "" > ~/.bash_history
rm ~/.Xauthority
rm /etc/ssh/ssh_host_*
echo "" > /etc/machine-id
systemctl disable --now salt-minion.service
echo
rm -rf /etc/salt/pki/minion/*
echo "" > /etc/salt/minion_id
echo "" > /etc/resolv.conf
history -c
exit
1. Execute as other user (optional):
echo "" > ~/.bash_history
rm ~/.Xauthority
history -c
sudo shutdown
exit