Last active
August 10, 2019 06:41
-
-
Save vasergen/ecb00bda9fd031c0874a78571894d936 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
one one one | |
one one one | |
one one one | |
one one one | |
one one one | |
one one one | |
#add MATE GUI to centos# | |
yum install -y redhat-lsb-core net-tools epel-release kernel-headers kernel-devel | |
yum groupinstall -y "Development Tools" | |
yum groupinstall -y "X Window system" "MATE Desktop" | |
systemctl set-default graphical.target | |
systemctl isolate graphical.target | |
#add GNOME GUI to centos mini | |
yum grouplist | |
yum groupinstall "GNOME Desktop" | |
yum groups install "Server with GUI" | |
asd asd asd asd | |
systemctl asd sdaaaa set-default graphical.target | |
asd asd asd asd | |
systemctl isolate graphical.target | |
#utils | |
cat | |
less | |
head | |
tail | |
cat > file <<END ... END -> heredoc | |
tar -cf bin.tar bin -> just archive | |
tar -czf bin.tar.gz bin -> zip archive | |
gzip bin.tar | |
bzip bin.tar | |
cpio | |
#####recover root password######## | |
1. interapt boot menu | |
2. remove `rhgb` `quit` | |
3. add `rd.break` `enforcing=0` | |
4. mount -o remount,rw /sysroot | |
5. chroot /sysroot | |
6. passwd ... | |
7. exit #go to switch_root | |
8. mount -o remount,ro /sysroot | |
9. exit | |
10.restorecon /etc/shadow | |
11.setenforce 1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment