Setting an static IP address in RHEL (the old way)

In RHEL8, you use NetworkManager or NMCLI to configure the networking, but in RHEL7 and before, you had to do it a different way. In this post I show you which files you need to configure to be able set a static IP in REHL7. 1) Edit the network card configuration file, which will be something like the following /etc/sysconfig/network-scripts/ifcfg-ens33 2) Add the network mask, and IP address.

PHP Script to return random D&D Monster name

I wanted to have a quick an easy way to get a random name, from say a list of D&D monsters. But I wanted the script to be accessible from anywhere on the network. So I wrote this simple PHP script and put it on a web server. create a new php file. paste this array into the file, inside the usual php tags. $filename = "names.txt"; $names = file($filename, FILE_IGNORE_NEW_LINES); $num = random_int(0,303); print ($names[$num]); create another file, called names.txt that contains the list of monster names. Change the 303 to the number of items in your list, minus 1 see demo

VMWare Player - How to change the default VM Location

By default, VMWare Player saves any VM you create to your documents folder and there doesn't appear to be a way to change that. However, there is.

Open up the following file in your favorite text editor:


Add in the following line, changing the path to your desired location:

prefvmx.defaultvmpath = "D:\Virtual Machines"

Save, restart VMWare Player, and your new location should work when creating a new VM.


Turning off suggestions in Visual Studio Code

Visual Studio Code, is a great program and it is my favorite editor, however it bugs me that it makes suggestions for every second work I type. This is how you turn that off. How to turn off word suggestion in Visual Studio Code: 1) Open Visual Studio Code 2) Open preferences: MAC: Code, Preferences, Settings PC: File, Preferences, Settings 3) Expand Text Editor, Select Suggestions 4) In about the middle of the page, click the "edit in settings.json" link 5) Add this line somewhere within the { } "editor.wordBasedSuggestions": false 6) Take careful note of the co

How to Change Authentication Method in MySQL

First, to check what is being used run this, SELECT user, authentication_string, plugin, host FROM mysql.user; If the user you are having issues with is set to auth_socket then you may need to change it to method with mysql_native_password Like this, mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; Change root to the user you need and set the password to whatever the password is supposed to be.

Installing software into a FreeNAS jail

Go to Jails On the right side of the page click the triple dots next to the Plex jail and select Shell type "whoami" and make sure the response is root (if not use su - or sudo) type vi /usr/local/etc/pkg/repos/FreeBSD.conf and press enter If the file exists, look for a line with "FreeBSD: { enabled: no }" and change the no to a yes OR If the file is empty type out "FreeBSD: { enabled: yes }" (if you are unfamiliar with vi, to edit just press the letter "a" then type the above stuff without the quotes) To save, hit the escape button twice and type ":wq" w

How to set a static IP address in RHEL8

How to set a static IP address in RHEL8 # get the current connection name [root@localhost ~]# nmcli con show NAME UUID TYPE DEVICE ens160 6b0e7866-7d4f-4668-afbf-a485f9a1e6db ethernet ens160 # Note the NAME of the connection # To see what IP, gateway and DNS you are currently using do [root@localhost ~]# nmcli con show ens160 | grep ipv4 ipv4.method: auto ipv4.dns: ipv4.addresses: ipv4.gateway:

Installing Visual Studio Code on RHEL

RHEL, Fedora, and CentOS based distributions We currently ship the stable 64-bit VS Code in a yum repository, the following script will install the key and repository: sudo rpm --import sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=\nenabled=1\ngpgcheck=1\ngpgkey=" > /etc/yum.repos.d/vscode.repo' Then update the package cache and install the package using dnf (Fedora 22 and above): sudo dnf check-update sudo dnf i

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer