Controlling the battery charging threshold on Asus laptop with Ubuntu 20.04

Controlling the battery charging threshold on Asus laptop with Ubuntu 20.04

From kernel 5.4+ there is an ability to control charging of the laptop battery. In the /sys/class/power_supply/BAT0/ are some variables useful for battery monitoring and controlling. ls /sys/class/power_supply/BAT0/alarm device@ manufacturer serial_number uevent capacity energy_full model_name status voltage_min_designcapacity_level energy_full_design power/ subsystem@ voltage_now charge_control_end_threshold energy_now power_now technology cycle_count hwmon2/ present type One of those variables is charge_control_end_threshold, it is just an integer […]

Copy, Cut and Paste in Vim&Vi

Copy, Cut and Paste in Vim&Vi

Vim or its precursor Vi comes preinstalled on macOS and almost all Linux distributions. Knowing the basics of Vim is helpful in a situation where your favorite editor is not available. Copy, Cut and Paste in Normal Mode When you launch the Vim editor, you’re in the normal mode. In this mode, you can run Vim commands and navigate through […]

Samba headaches, solution

Samba headaches, solution

From the beginning of time for me on Linux, samba is a headache!Now, finally, I think I found a solution: https://linuxconfig.org/how-to-configure-samba-server-share-on-ubuntu-20-04-focal-fossa-linux And this for some permision problems: https://forums.unraid.net/topic/56307-missing-filesfolders-via-samba/

How to reset Webmin password

How to reset Webmin password

Webmin is a web-based interface for system administration for Unix and Unix-like systems. For some wired reason, Google Chrome didn’t remember or forget to remember my webmin passwords and I have to change my passwords frequently. And every time when I have to do that, I have to search the net for the solution 🙂 because I’ve been forgetting, frequently, […]

Mount an remote directory using SSHFS

Mount an remote directory using SSHFS

Tested on Ubuntu 18.04 and 18.10 First install the module sshfs, if isn’t installed: Load module in kernel: Setting the permissions: If you get an error from last command: No such file or directory Now we need to create a directory for mounting the remote folder. For example onCloudDir. Now we ran the command to mount the remote folder: xxx.xxx.xxx.xxx is an address […]

My list of commands for monitoring network traffic on Linux server

Network monitoring on Linux This post mentions some Linux command line tools that can be used to monitor the network usage. These tools monitor the traffic flowing through network interfaces and measure the speed at which data is currently being transferred. Incoming and outgoing traffic is shown separately. Some of the commands, show the bandwidth used by individual processes. This […]

How to enable .htaccess in Apache HTTP server

.htaccess A .htaccess file is a directory-level configuration file for Apache HTTP server, which allows one to override the web server’s system-wide settings without modifying the global configuration file (e.g., httpd.conf or apache2.conf). Things like per-directory access control, password protection, URL redirection or hotlink prevention can be configured in the .htaccess file. You should avoid using file.htaccess completely if you have […]

Running several name-based web sites on a single IP address.

If your server has multiple hostnames that resolve to a single address, and you want to respond differently for www.example.com and www.example.org. Creating virtual host configurations on your Apache server does not magically cause DNS entries to be created for those hostnames. You must have the names in DNS, resolving to your IP address, or nobody else will be able to see your website. You […]