Como habilitar o TRIM do seu SSD no Windows

Verificando o TRIM, digite no prompt de comando:

fsutil behavior query DisableDeleteNotify

DisableDeleteNotify = 1 – O TRIM está desabilitado.
DisableDeleteNotify = 0 – O TRIM está habilitado.

Para habilitar o TRIM, digite:

fsutil behavior set DisableDeleteNotify 0

E para desabilitar:

fsutil behavior set DisableDeleteNotify 1

Verificando e corrigindo arquivos corrompidos no Windows

Abra o terminal como administrador e execute os comandos:

dism /online /cleanup-image /checkhealth

dism /online /cleanup-image /restorehealth

sfc /scannow

Instalando adicionais para convidado (VirtualBox) no RHEL 9

Antes de instalar a imagem do CD, execute:

dnf install dkms binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers elfutils-libelf-devel

Como limpar a memória Swap no Linux

Verificando a memória:

free -h

Limpando a memória:

sudo swapoff -av; sudo swapon -av

Migrando de CentOS 8 para CentOS Stream 8

Após o fim do suporte ao CentOS 8, ao tentar atualizar o SO irá retornar o seguinte erro:

Error: Failed to download metadata for repo ‘appstream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist

Para migrar para o CentOS Stream 8 digite o seguinte no shell:

dnf --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos
dnf distro-sync
dnf clean all
dnf update

Gelmerbahn

Como instalar o Apache, MySQL e PHP no Oracle Linux 8

Instalando o Apache

Digite no prompt de comando:

sudo dnf -y install httpd

Agora inicie e habilite o serviço para iniciar com o sistema:

sudo systemctl start httpd
sudo systemctl enable httpd

Libere a porta no firewall:

sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --reload

Instalando o PHP

Digite no prompt de comando:

sudo dnf install -y php

Reinicie o Apache:

sudo systemctl restart httpd

Instalando o MySQL

Digite no prompt de comando:

sudo dnf -y install @mysql

Inicie o serviço:

sudo systemctl start mysqld
sudo systemctl enable mysqld

Execute a instalação segura:

sudo mysql_secure_installation

Respostas:

Press y|Y for Yes, any other key for No: y
Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2
New password:
Re-enter new password:
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y

Como adicionar data e hora no history do Linux

Edite o arquivo /etc/profile e adicione essa linha no final do arquivo:

export HISTTIMEFORMAT='%d/%m/%Y - %H:%M:%S: '

Como instalar fontes do Windows no Ubuntu

Digite no prompt de comando:

sudo apt-get install ttf-mscorefonts-installer

Como adicionar e remover rotas no Windows

Adicionando uma rota:

route ADD "IP DA REDE" MASK "IP DA MÁSCARA" "IP DO GATEWAY"

Adicionando uma rota permanente (não perde a rota ao reiniciar):

route ADD "IP DA REDE" MASK "IP DA MÁSCARA" "IP DO GATEWAY" -P

Removendo uma rota:

route DELETE "IP DA REDE"

Visualizando as rotas:

route print