- [ ] # SLE 15 HW
###### tags `Linux` `SuSE`
## common
1. sudo
1-1 特定群組 可以執行 sudo
1-2 特定使用者 可以執行
1-3 不需要密碼 就可以執行
```bash
# 1-1
linux:~ # usermod -aG 'group' 'user'
```
2. user account
2-1 lock user account
2-2 unlock user account
2-3 how to check user account lock/unlock
```bash
# 2-1
linux:~ # passwd -1 'username'
# 2-2
linux:~ # passwd -u 'username'
```
3. password
3-1 root 幫使用者改密碼
3-2 使用者 自己改密碼
3-3 使用者下次登入強制改密碼
3-4 使用者在期限內需要改密碼
```bash
# 3-1
linux:~ # passwd 'username'
# 3-2
linux:~ # passwd
# 3-3
linux:~ # chage -d 0 'username'
# 3-4
linux:~ # chage -M 'time(day)' 'username'
```
4. shell
4-1 root 幫使用者改 shell
4-2 使用者自己改 shell
```bash
# 4-1
linux:~ # chsh 'path to shell' 'username'
# 4-2
linux:~ $ chsh 'path to shell'
```
5. add repo
5-1 by yast
5-2 by zypper
```bash
# 5-1
linux:~ # yast2 repositories add
# 5-2
linux:~ # zypper addrepo
```
6. install package (gpm, locate ...)
6-1 by yast
6-2 by zypper
6-3 by rpm
```bash
# 6-1
linux:~ # yast2 -i 'packagename'
# 6-2
linux:~ # zypper install 'packagename'
# 6-3
linux:~ # rpm -ivh(i=install,v=verbose,h=#) 'packagename.rpm'
```
---
1. chown
1-1 change file owner/group
1-2 recurvely change all file owner in one directory
2. chmod
2-1 change owner/group/other operation mode by bit mask
2-2 change owner/group/other/all operation mode by
ref
2-3 create directory then everyone could create file/dir in the directory but can't delete it
2-4 run command with as someone
3. vnc
3-1 install vnc server and vnc viewer
3-2 connect vnc server
4. ssh
4-1 install ssh server
4-2 connect ssh server
5. package
5-1 install package htop
5-2 install pattern devel_kernel
---
1. forget root password
hit: when booting to edit grub
2. install intel compiler
2-1 intel c
2-2 intel fortran
2-3 intel mpi
2-4 intel mkl
3. vm
3-1 create bridge mode nic
3-2 create nat mode nic
3-3 create host-only/internal mode nic
4. vi
4-1-a select all
4-1-b copy, paste and replace
4-2-a visual mode select
4-2-b copy, paste and replace
4-3-a block mode select
4-3-b copy, paste and replace
4-4-a select word
4-4-c copy, paste and replace
4-5-a word to upper case
4-5-a word to lower case
---
1. makefile
1-1 print hello
1-2 make subdirectory
1-3 split variable
1-4-1 explain @
1-4-2 explain PHONY
1-5-1* create static library
1-5-2* create dynamic library
2. vasp
2-1 compile
2-2 run with sequential
2-3 run with mpi
2-4* run with openmp
3. ssh
3-1 no password login
3-2 disable password login
3-3 ssh tunnel (ex impi on windows, linux/macosx)
3-4 allow user/group
3-5 deny user/group
3-6* list file/dir of server config
3-7 service port and protocol
---
1. nis/yp
1-1 setup nis server and client
1-2 allow client change password
1-3 server change password
1-4 setup/assign start uid
1-5* list file/dir of server config
1-6 service port and protocol
2. nfs
2-1 setup nfs server and client
2-2 use /etc/fstab
2-3* list file/dir of server config
2-4 service port and protocol
3. http
3-1 setup http server
3-2 anonymous browse dir/file
3-3* list file/dir of server config
3-4 service port and protocol
4. ftp
4-1 setup ftp server
4-2 anonymous browse dir/file
4-3* list file/dir of server config
4-4 service port and protocol
5. telnet
5-1 setup telnet server
5-2* list file/dir of server config
5-3 service port and protocol
6. firewall
6-1 run ypserv when be enable firewall
6-2 run nfs when be enable firewall
6-3 run http when be enable firewall
6-4 run ftp when be enable firewall
6-5 run telnet when be enable firewall
6-6* list file/dir of firewall config
---
1. dhcp
1-1 setup dhcp server
1-2* list file/dir of server config
1-3 service port and protocol
2. dns
2-1 setup dns server
2-2* list file/dir of server config
2-3 service port and protocol
3. pxe
3-1 install pxe image
4. tftp
4-1 setup dhcp server
4-2* list file/dir of server config
4-3 service port and protocol
---
1. dnsmasq
1-1 dhcp
1-2 dns
1-3 tftp
2. autoyast
2-1 create autoyast config (xml)
2-2 setup autoyast on grub2
3. ntp
3-1 chrony
3-2* ntpserver & ntpdate/sntp
4. network boot system*
4-1 dhcp + dns + pxe + tftp + autoyast
4-2 replace dhcp and dns(bind/namd) with dnsmasq
---
1. slurm
1-1 setup slurmctld, slurmd
1-2 run vasp on slurm
1-3 setup qos
1-4 setup admin, operator, coordinator
---
1. bash
1-1 variable, array, associated array
1-2 if/else
1-3 for and while
1-4 pipeline
2. system utility
2-1 dmidecode
2-1-1 find system spec, sn
2-2 lscpu, lshw, lspci, lsusb, lsscsi
2-2-1 show cpu current work clock frequency
2-3 top, free, lsblk, du, df, iotop
2-3-1 count current directory disk usage
2-3-2 explain free to show info
2-4 ps/pstree, kill/pkill/killall, lsof
2-5 vmstat, sar
3. network utility
3-1 iputils: ping, tracepath
3-2 bind-utils: nslookup, dig
3-2-1 find ip by hostname
3-3 netcat-openbsd: nc/netcat
3-4 nmap, tcpdump
---
1. systemd
1-1 inittab
1-2 crontab, at
1-3 tmpfiles
2. other
2-1 timedatectl
2-2 hostnamectl
---
1. filesystem
1-1 ext2, ext3, ext4
1-2 xfs
1-3 swap
1-4 fat32, exfat
1-5 ntfs
1-6 raid
1-7 lvm
1-8 btrfs
2. partition
2-1 fdisk
2-2 parted
2-3 yast
3. desktop environment
3-1 xorg
3-2 gnome
3-3 kde
3-4 xfce
3-5 cinnamon
3-6x unity
---
1. virtual machine
1-1 virtualbox
1-2 kvm/qemu x64, arm64
1-3 vmware workstation
1-4 vmware esxi
1-5* vm network type:
host only, nat, bridge
1-6* vm cluster
public cloud: aws, gcp, azure
private cloud: openstack, vmware vsphere
2. container
2-1 docker
2-2* podman
2-3* cri-o
2-4* container cluster
public cloud: eks, gke,
large system: k8s, docker swarm
person system: minikube
---
## ref
https://github.com/Jackxul
[SUSE Linux Enterprise Server 15 SP4
Administration Guide](https://documentation.suse.com/sles/15-SP4/html/SLES-all/book-administration.html)
[SuSE Packages](https://scc.suse.com/packages)
[SUSE Package Hub](https://packagehub.suse.com/)
[notes](https://github.com/very-big-bear/notes)