Jul 15, 2021

Disk

How to check HDD/SSD/USB disk?


Windows

Victoria ( hdd[dot]by/victoria )

MiniTool Partition Wizard ( partitionwizard[dot]com )

Linux

...

Mac OS X

...

Jul 8, 2021

Linux

How to create a systemd service?

Application:

$ cat myapp.sh

#!/usr/bin/bash

echo "I'm a test app" > /tmp/test.file

Service:

$ cat /etc/systemd/system/myapp.service

...

After=network.target

After=mysqld.service

Restart=on-failure

RestartSec=1

Start the service:

$ sudo systemctl start myapp

Start on boot:

$ sudo systemctl enable myapp

How to disable beep speaker?

# temporary

$ sudo rmmod pcspkr

# permanently

$ sudo gedit /etc/modprobe.d/blacklist

    blacklist pcspkr

$ reboot

SSH by key

$ ssh-keygen -t ed25519 -C "new"

$ cat ~/.ssh/config

Host x.x.x.x

  HostName x.x.x.x

  IdentityFile ~/.ssh/new

  IdentitiesOnly yes

  User root

  Port 22

$ ssh x.x.x.x

Jul 6, 2021

CentOS

How to get details about OS version?

$ cat /etc/os-release

$ cat /etc/centos-release

$ uname -a

Jul 5, 2021

HowTo Mac

How to fix a problem with russian characters in console?

Temporary solution: 

$ export LC_ALL=ru_RU.UTF-8
$ export LANG=ru_RU.UTF-8

Permanent solution:

Add env variables to the end of this file: ~/.bash_profile

$ source ~/.bash_profile

Kubernetes

kubectl installation $ curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl...