ping: socket: Operation not permitted

Got error with Debian Bullseye jon2allen@lamp2c$ ping www.yahoo.com ping: socket: Operation not permitted to allow all users to ping again echo “0 2147483647” > /proc/sys/net/ipv4/ping_group_range to make permanent echo “net.ipv4.ping_group_range = 0 2147483647” >> /etc/sysctl.conf Here is where it is documented   https://lore.kernel.org/lkml/20110518174959.GA6019@albatros/ https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt

Bitnami VM – how to enable SSH for password ( notes )

There is a special procedure. ( debian ) SSH is disabled by default.  If you download a VM from bitnami sudo rm -f /etc/ssh/sshd_not_to_be_run sudo systemctl enable ssh sudo systemctl start ssh So, to enable password. edit /etc/ssh/sshd_config Uncomment the password field # To disable tunneled clear text passwords, change to no here! PasswordAuthentication yes #PermitEmptyPasswords no To add a […]

Script to create a KVM bridge in Fedora 35

This will enable the guest machines to get an address for the local lan ( home network ).  You put in bridged in the KVM config and device is “br0” #!/bin/sh export MAIN_CONN=enp5s0f0 bash -x <<EOS systemctl stop libvirtd nmcli c delete “$MAIN_CONN” nmcli c delete “Wired connection 1” nmcli c add type bridge ifname br0 autoconnect yes con-name br0 […]

How to kill all vscode process on remote Linux server

If you disconnect vscode from a linux server. You will see all these  node tasks that vscode uses. root@lamp ~# ps -ef | grep vscode root 8966 28764 0 15:11 pts/2 00:00:00 grep –color=auto vscode jon2all+ 22881 1 0 Apr28 ? 00:00:00 sh /home/jon2allen/.vscode-server/bin/f4af3cbf5a99787542e2a30fe1fd37cd644cc31f/server.sh –start-server –host=127.0.0.1 –enable-remote-auto-shutdown –port=0 –connection-secret /home/jon2allen/.vscode-server/.f4af3cbf5a99787542e2a30fe1fd37cd644cc31f.token jon2all+ 22889 22881 0 Apr28 ? 00:06:02 /home/jon2allen/.vscode-server/bin/f4af3cbf5a99787542e2a30fe1fd37cd644cc31f/node /home/jon2allen/.vscode-server/bin/f4af3cbf5a99787542e2a30fe1fd37cd644cc31f/out/vs/server/main.js –start-server […]

Python script to find extensions in directory

Here is a way to find out what type of windows extensions.  pictures in this case. Count how many of each.   import os ext_count = dict() my_root = r”C:\Users\jonallen\Pictures” # some dir to start in for root, dirs, files in os.walk(my_root): for file in files: pathname, exten = os.path.splitext(file) if exten in ext_count.keys(): ext_count[exten] += 1 else: ext_count[exten] = […]

Bash array operations – short table.

arr=() Create an empty array arr=(1 2 3) Initialize array ${arr[2]} Retrieve third element ${arr[@]} Retrieve all elements ${!arr[@]} Retrieve array indices ${#arr[@]} Calculate array size arr[0]=3 Overwrite 1st element arr+=(4) Append value(s) str=$(ls) Save ls output as a string arr=( $(ls) ) Save ls output as an array of files ${arr[@]:s:n} Retrieve n elements starting at index s

Vim tips and links

  Here are a few useful links about VIM editor. Good overview of some nifty feature. https://www.cs.oberlin.edu/~kuperman/help/vim/home.html .vimrc tutorial at linuxhint. Vimrc Tutorial