HostOnNet Blog

Category Archives: Linux

random

To generate random string, run This generate a random string of length 32 chars. Example Another command is Example


virt-install OS variant does not exist

When creating virtual machine with virt-install, i get error ERROR OS variant ‘ubuntu16.04’ does not exist in our dictionary for OS type ‘linux’ This is because the version of libvirt installed on the server do not support OS variant ‘ubuntu16.04’.


Mount VM filesystem with guestmount

guestmount is used to mount virtual machine images. To mount a file system image, use Example


guestfish

guestfish is used to mount virtual machine file systems.


selinux

Just disable it


e2fsck

e2fsck is used to check disk for errors. Example e2fsck -f -y /dev/mapper/vg1-kvm101_img1


lvcreate – Create a logical volume

lvcreate command is used to create logical volume. To create a logical volume with disk size 10 GB inside volume group vg1, run lvcreate –size 20G –name LV-NAME-HERE VG-NAME-HERE First lets list all logical volumes on our server with command


format ls result with awk

awk is a linux command used to search text and format it. To get list of file names in a folder, run Example boby@hon-pc-01:~/src$ ls -l | awk ‘{print $9}’ master.zip nginx-1.11.5 nginx-1.11.5.tar.gz nginx-rtmp-module-master php-5.6.30 php-5.6.30.tar.gz postgresql-9.6.0 postgresql-9.6.0.tar.gz vlc vlc-requirments.ttx


Install ssocksd Proxy Server

To install ssocksd proxy server, run To start ssocksd server, run This will run socks5 proxy server with out authentication on port 7070. Only run with out authentication if you have firewall running, that can limit access to proxy port


curl use socks5 proxy

To use curl through socks5 proxy, use if your proxy server require username and password, use Example curl proxy