DevOps
General technical system administration and devops documentation.
Linuxඞ
General Linux tidbits.
Sudo and rootඞ
You may see sudo su -
used instead of sudo -i
but there are some subtle differences between them. The sudo su -
command sets up the root environment exactly like a normal login because the su -
command ignores the settings made by sudo and sets up the environment from scratch. The default configuration of the sudo -i
command actually sets up some details of the root user's environment differently than a normal login. For example, it sets the PATH environment variable slightly differently. This affects where the shell will look to find commands. You can make sudo -i
behave more like su -
by editing /etc/sudoers
with visudo
. Find the line
Text Only | |
---|---|
and replace it with the following two lines:
Text Only | |
---|---|
For most purposes, this is not a major difference. However, for consistency of PATH settings on systems with the default /etc/sudoers file
, it must be considered.
SSHඞ
Fix SSH permissionsඞ
Bash | |
---|---|
Virtualizationඞ
Check nested virtualization supportඞ
Intel:
cat /sys/module/kvm_intel/parameters/nested
modinfo kvm_intel | grep -i nested
AMD:
cat /sys/module/kvm_amd/parameters/nested
modinfo kvm_amd | grep -i nested
Diskඞ
Check if disk is SSD or HDDඞ
Text Only | |
---|---|
CPU sockets and coresඞ
Only use first CPU socket for a task:
Bash | |
---|---|
Check which cores are E-cores (efficiency cores) and run task only on P-cores (performance cores):