How to enable telnet on Windows 10 No further Introduction is needed for this tool … Open command line as an administrator and write the following command. Hit enter & your’re done!
1 |
dism /online /Enable-Feature /FeatureName:TelnetClient |
How to enable telnet on Windows 10 No further Introduction is needed for this tool … Open command line as an administrator and write the following command. Hit enter & your’re done!
1 |
dism /online /Enable-Feature /FeatureName:TelnetClient |
Listing current pools:
1 2 3 4 5 6 |
$ virsh pool-list Name State Autostart ------------------------------------------- default active yes |
Destroying pool:
1 2 3 |
$ virsh pool-destroy default Pool default destroyed |
Undefine pool:
1 2 3 |
$ virsh pool-undefine default Pool default has been undefined |
Defining a new pool with name “default”:
1 2 3 |
$ virsh pool-define-as --name default --type dir --target /media/work/kvm Pool default defined |
Set pool to be started when libvirt daemons starts:
1 2 3 |
$ virsh pool-autostart default Pool default marked as autostarted |
Start pool:
1 2 3 |
$ virsh pool-start default Pool default started |
Checking pool state:
1 2 3 4 |
$ virsh pool-list Name State Autostart ------------------------------------------- default active yes |
source
Create Windows 10 bootable usb from linux tested on Ubuntu 18.04. Download windows 10 iso from here Install woeusb from source (tested on ubuntu 18.04)
1 2 3 4 5 6 7 8 |
git clone https://github.com/slacka/WoeUSB.git cd WoeUSB/ ./setup-development-environment.bash sudo apt-get install devscripts equivs gdebi-core mk-build-deps sudo gdebi woeusb-build-deps_*.deb dpkg-buildpackage -uc -b sudo gdebi ../woeusb*.deb |
Make it bootable with woeusb
1 |
sudo woeusb --device win_10.iso /dev/sde --target-filesystem NTFS |
Tip: If woeusb starts to complain for mounted device etc … Unmount and unplug the usb device. Plug the usb and unmount the […]
To find the largest files and directories on a linux server, type the command bellow… and grab a cup of coffee afterwards. Change head -n $top_num to your liking to get the top x files and/or directories.
1 |
du -a / | sort -n -r | head -n 5 |
Cloud-init doesn’t work with predictable network names … So In favor of cloud-init automated network set up disable them. In: /etc/default/grub Change to: GRUB_CMDLINE_LINUX=”net.ifnames=0 biosdevname=0″ source
Find files or directories owned by user/group and permission bits Find all files not owned by user
1 |
find dirPath ! -user {user-name} |
Find all files not owned by group
1 |
find dirPath ! -group {group-name} |
Find all files that don’t have specific permissions
1 |
find dirPath ! -perm {perm-bits} |
Examples: Find all files that don’t have 755 permissions
1 |
find dirPath ! -perm 755 |
Combine all parameters: Find all python files […]
Find and Delete log files on a linux system. Think before you act.
1 |
find / -name '*bash_history*' -name '*.bash_logout' -name '*log*' -name '*ksh_history*' -name '*bash_logout*' -name '*utmp*' -name '*wtmp*' -name '*adm*' |
Mount disk and install grub boot loader
1 2 |
mount /dev/sdX /mnt grub-install --boot-directory=/mnt/boot /dev/sdX |
Delete all lines of a file containing a regex pattern using sed. For example you can delete all commented lines of a default configuration file. Take a look on my basic regex cheat sheet
1 |
sed -i '/regexPattern/d' path/to/file1.log |