yum install psmisc
nmap scan subnet free ip
sudo nmap -v -sn -n 192.168.100.0/24 -oG - | awk '/Status: Down/{print $2}'
ubuntu live usb hangs
sudo nano /etc/sysctl.conf
vm.dirty_background_ratio = 5
vm.dirty_ratio = 10
ssh default user
vim ~/.ssh/config
Host *
User root
bash history size unlimited
vim /root/.bashrc
export HISTFILESIZE=
export HISTSIZE=
bash history add timestamp
echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bashrc
source ~/.bashrc
pvs unknown lvm2
If error like this: WARNING: Device for xxx not found or rejected by a filter.
vgreduce –removemissing –verbose VG
linux mount two directories same partiton
mount –bind /some/ssd/running/part /var/lib/mysql
convert xfs to ext4 boot
Centos 7 auto partition creates xfs, but better use ext4 on server side
fstransform /dev/sda1 ext4
grub2-install /dev/sda
grub2-mkconfig -o /boot/grub2/grub.cfg
#/dev/sda1 boot partition
kvm install windows 10
Download there:
https://the-eye.eu/public/MSDN/Windows%2010/
sudo virt-install --name=windows10 --ram=2192 --cpu=host --vcpus=2 --os-type=windows --os-variant=win8.1 --disk /dev/mapper/vg-win,bus=virtio --disk /tmp/en_windows_10_enterprise_x64_dvd_6851151.iso,device=cdrom,bus=ide --disk /usr/share/virtio-win/virtio-win.iso,device=cdrom,bus=ide --network bridge=virbr0 --graphics vnc,listen=0.0.0.0
fedora increase tmp size
mount -o remount,size=4G,noatime /tmp
print all after regex match
mysql -s -e 'show databases' | sed '1,/all_databases_after_some_one/d'
Make sure you loaded all the kernel drivers you need.
sensors-detect
Failed to start LSB: Bring up/down networking
systemctl status network.service
● network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2018-10-16 14:53:33 EEST; 39s ago
Docs: man:systemd-sysv-generator(8)
Process: 19847 ExecStop=/etc/rc.d/init.d/network stop (code=exited, status=0/SUCCESS)
Process: 20735 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)
Oct 16 14:53:33 xxx.xxx.lt network[20735]: RTNETLINK answers: File exists
Oct 16 14:53:33 xxx.xxx.lt network[20735]: RTNETLINK answers: File exists
Oct 16 14:53:33 xxx.xxx.lt network[20735]: RTNETLINK answers: File exists
Oct 16 14:53:33 xxx.xxx.lt network[20735]: RTNETLINK answers: File exists
Oct 16 14:53:33 xxx.xxx.lt network[20735]: RTNETLINK answers: File exists
Oct 16 14:53:33 xxx.xxx.lt network[20735]: RTNETLINK answers: File exists
Oct 16 14:53:33 xxx.xxx.lt systemd[1]: network.service: control process exited, code=exited status=1
Oct 16 14:53:33 xxx.xxx.lt systemd[1]: Failed to start LSB: Bring up/down networking.
Oct 16 14:53:33 xxxx.xxx.lt systemd[1]: Unit network.service entered failed state.
Oct 16 14:53:33 xxx.xxx.lt systemd[1]: network.service failed.
systemctl stop NetworkManager
systemctl disable NetworkManager
systemctl restart network
grep binary file (standard input) matches
grep -ar some/path/*