Per aggiungere una subscription ad un sistema RHEL usare il comando: subscription-manager register –username <nome utente> –password <password> –auto-attach
Categoria:RHEL6
Scan SCSI bus – RedHAT
Per effettuare un rescan del bus scsi sui sistemi Linux usare il seguente comando: for disco in $(ls /sys/class/scsi_host/host*/scan); do echo “- – -” > $disco; done
Modificare group ID
groupmod -g 500 gruppo
Modificare user ID
usermod -u 500 utente
Verifica runlevel
[root@localhost ~]# runlevel N 3 [root@localhost ~]# who -r run-level 3 2024-02-17 12:11
Analisi struttura directory
[root@localhost ~]# tree -dugp /etc/systemd/ /etc/systemd/ ├── [drwxr-xr-x root root ] system │ ├── [drwxr-xr-x root root ] basic.target.wants │ ├── [drwxr-xr-x root root ] default.target.wants │ ├── [drwxr-xr-x root root ] dev-virtio\\x2dports-org.qemu.guest_agent.0.device.wants │ ├── [drwxr-xr-x root root ] getty.target.wants …
Continua a leggere Analisi struttura directory
Reset root password
1 Riavviare la macchina 2 Al prompt per la scelta del kernel premere “e” per edit 3 Modificare la riga che inizia per “linux16” aggiungendo a fine riga “rd.break enforcing=0” 4 Premere “ctrl-x” per avviare in single user mode 5 mount -o remount,rw /sysroot 6 cp /bin/bash /sysroot/tmp 7 chroot /sysroot /tmp/bash 8 passwd root …
Continua a leggere Reset root password
YUM elencare versioni disponibili
Per elencare tutte le versioni disponibili di un pacchetto usare il comando: yum –showduplicates list available <pacchetto> $ yum –showduplicates list available perl Pacchetti installatiperl.x86_64 4:5.16.3-292.el7 @basePacchetti disponibiliperl.x86_64 4:5.16.3-297.el7 baseperl.x86_64 4:5.16.3-299.el7_9 updates
Modificare permessi a file o directory
Modificare file: find . -type f -exec chmod 644 {} \; Modificare directory: find . -type f -exec chmod 644 {} \;
Installazione RPM multipli
Nel caso in cui un software sia distribuito sotto forma di diversi pacchetti rpm per installarlo gestendo le dipendenze usare il seguente comando: yum install *.rpm