rhce习题集rhel7

  1. 破密:

    e-->linux16 rd.break Ctrl+x-->mount -o remount,rw /sysroot-->chroot /sysroot-->echo flectrag|passwd --stdin root-->touch /.autorelabel-->Ctrl+D-->reboot

  2. 修改hostname和ip地址

    nm-connector-editor

    IPADDR0-->PREFIX0-->GATEWAY0-->DNS1-->DOMAIN

    chattr +i /etc/resolv.conf

    hostnamectl set-hostname example.com

  3. yum.repos.d/rhel.repo

    [yumserver]

    name=yumserver

    baseurl=http:///

    gpgcheck=0

    enabled=1

  4. lvm

    ext4: 增大 lvextend -L 300M /dev/vg1/lv1 resize2fs /dev/vg1/lv1

    xfs:       xfs_growfs /mountpoint

          减小 umount /dev/vg1/lv1 e2fsck -f /dev/vg1/lv1 resize2fs /dev/vg1/lv1 100M

               lvreduce -L 100M /dev/vg1/lv1 mount -a

  5. resize2fs /dev/vg1/lv1

  6. groupadd adminuser

    useradd natasha -G adminuser

    useradd harry -G adminuser

    useradd sarah -s /sbin/nologinb

    passwd natasha harry sarah

  7. cp /etc/fstab /var/tmpfsta

    setfacl -m u:natasha:rw /var/tmp/fstab

    setfacl -m u:harry:- /var/tmp/fstab

  8. crontab -e -u natasha

    23 14 * * * /bin/echo hiya

  9. mkdir /home/admins

    chgrp adminuser /home/admins

    chmod 2770 /home/admins

  10. ftp  get  rpm  vi /etc/grub.conf修改默认启动内核

  11. yum install authconfig-gtk

  12. vim /etc/chrony.conf

    systemctl restart chronyd.service (enable)

  13. useradd -u 1234 alex

  14. fdisk /dev/vdb n-->e-->E-->E ;fdisk /dev/vdb n-->l-->E-->+500M-->E-->t-->82-->w

    part -a /dev/vdb

    mkswap /dev/vdb6

    UUID

    vim /etc/fstab

    UUID  swap swap  defaults 0 0

    swapon -a

  15. mkdir /root/findfiles

    find / -user ira -exec cp {} /root/findfiles \;

  16. grep 'semisc' /usr/share/dict/words /root/wordlist


你可能感兴趣的:(RHEL,rhce)