How to manage LXD containers as regular user
Manage LXD containers as regular user. ...
Manage LXD containers as regular user. ...
Display Universally Unique Identifiers (UUID) for Linux Software RAID devices. ...
Inspect mount options for specific mountpoint or device. ...
Display inotify watches and instances using dedicated inotify-info reporting application. ...
Securely edit configuration files as specific user. ...
List manually installed packages. ...
Increase the maximum number of file watches that are allowed for each user. ...
Display OpenSSH daemon configuration. ...
Distinguish between rotational and non-rotational block devices. ...
Display systemd journal since system boot. ...
Display basic computer information using DMI table decoder. ...
Control the wget dot display to pretty-print retrieval status for large files which proved to be useful inside shell script or CI/CD jobs. ...
Check version of a dockerized application using a very simple idea. ...
Inspect OpenSSH configuration. ...
Add or remove user from a group using multiple different utilities. ...
Identify hardware network interfaces. ...
Ensure that HAProxy can assign a non-local IP address. ...
Determine command used to start docker conainer using runlike utility. ...
Downgrade and keep specific package version. ...
Use smartmontools (S.M.A.R.T. monitoring tools) on Debian-based operating system to perform disk check. ...
Configure Advanced Power Management features on removable hard drives. ...
Determine software RAID array (Multiple Device driver aka Linux Software RAID) state using command-line utility. ...
Enable write-intent bitmap (internal) on software RAID devices (Multiple Device driver aka Linux Software RAID). ...
Configure Wake-on-LAN using systemd. ...
Execute systemctl command asynchronously and do not wait for its completion. ...
Sometimes GRUB can complain about missing device map file. ...
Start interactive shell using systemd machine manager. ...
Enable HashiCorp Consul maintenance mode. ...
Inspect firmware update using RACADM command-line utility which provides a scriptable interface for Remote Access Controller. ...
Force curl to use HTTPS protocol. ...
Display hardware information using inxi a full featured system information script. ...
Execute Varnish Test Cases to test Varnish HTTP Cache and HAProxy configuration. ...
Determine available LXD server resources. ...
Display IPv4 address without network utilities. ...
Determine when HashiCorp Consul snapshot was created. ...
Create HasiCorp Consul snapshots for disaster recovery. ...
Create Mastodon maintenance jobs for bare-metal Mastodon installation from source code. ...
Create persistent sysfs configuration using systemd which can replace sysfsutils. ...
Inspect a path during the troubleshooting process. ...
Install Guest Agent inside Proxmox virtual machine. ...
Check the consistency of an EC or RSA private key. ...
Locate modified systemd unit configuration files. ...
Load kernel modules at boot. ...
Determine when package index was updated. ...
Determine when systemd service was started. ...
Check memory subsystem from user space. ...
Install and configure chrony NTP server. ...
Inspect dnf configuration. ...
Copy Proxmox virtual machine to another server. ...
Configure OpenSSH server to use legacy public key algorithm to authenticate itself to an SSH client. ...
Install and configure HashiCorp Vault. ...
Display active but disabled systemd services. ...
Instruct consul to disable automatic checking for updates. ...
Configure Unbound DNS validating resolver. ...
Display the name of the wireless network you are connected to. ...
Configure Consul Access Control Lists. ...
Parse and filter dpkg database to display selected fields or other specific information. ...
Scan wireless networks. ...
Create an exception for a regular user to access service socket using systemd. ...
Secure Consul communication. ...
Determine maximum memory capacity. ...
Display hardware information. ...
Install and configure Consul. ...
Forward port (IPv4 only) using Dynamic Firewall Manager. ...
Configure persistent DNS resolver using systemd resolver or name server information handler. ...
Noninteractively configure system locales. ...
Read sysexits FreeBSD manual page to learn how to use consistent exit codes in shell scripts. ...
Determine fastest server using the Internet Control Message Protocol (ICMP). ...
Define ticket lifetime and renewable time when using MIT Kerberos. ...
Flush buffers on a specific device using blockdev utility. ...
Increase the limit of the mmap counts for Elasticsearch service. ...
Alter date format when listing cached Kerberos tickets. ...
Disable IPv6 on Raspberry Pi 4. ...
Configure HashiCorp repository. ...
Reload network configuration on Debian Bullseye. ...
Create and configure Virtual eXtensible Local Area Network interfaces. ...
Instruct dnf to skip confirmation dialog and assume yes for every question. ...
Ensure that every Ubuntu virtual machine from the same template get its own IP address. ...
Automatically rollover Elasticsearch index using by time. ...
Install the most recent kernel using experimental Debian distribution to see what is coming up. ...
Display systemd journal for specific service since it started. ...
Display CPU information. ...
Configure multiple IPv4 addresses on Raspberry Pi device. ...
Determine when the service was started and stopped using the systemd journal. ...
Display when the operating system was booted and calculate uptime using the systemd journal. ...
How to provide custom TXT records in class 3 (CHAOS) using BIND9. ...
Renew Kerberos ticket. ...
Mount host directory inside LXD container. ...
Display the BIND version and learn how to hide it. ...
Disable onboard WiFi and Bluetooth on Raspberry Pi 4 device. ...
Configure minimal MIT Kerberos server. ...
Specify the exact list of enabled PAM profiles using a simple workaround. ...
Unlock user account in Samba Active Directory ...
Configure static IP address on Raspberry Pi 4 device. ...
Configure wireless network on Raspberry Pi 4. ...
Configure SSH access using Samba Active Directory. ...
Manage global password policy settings in Samba Active Directory. ...
Manage UNIX groups and users in Samba Active Directory. ...
Create Samba Active Directory server using Debian Bullseye. ...
Parse the fastest available dnf mirror data. ...
Improve dnf download times. ...
Fix failed dynamic DNS update with Samba Active Directory and System Security Services Daemon by upgrading internal Samba DNS to BIND. ...
Determine fastest APT server using the Internet Control Message Protocol (ICMP). ...
Take advantage of Docker to install Mastodon. ...
Install Ubuntu Release Upgrader on an older system. ...
Check System Security Services Daemon configuration. ...
Configure System Security Services Daemon to disable SUDO Smart Refresh task. ...
Brief note about Samsung SSD T7 on Raspberry Pi 4 which provided a nice boost to my personal GitLab instance at home. The performance is strongly limited due to Raspberry Pi device constraints, but it is still much better than regular HDD. ...
Identify Raspberry Pi device using built-in leds. ...
Configure System Security Services Daemon (sssd) to update Active Directory DNS using the custom interval. ...
A long time ago I have described how to check external IP address using ssh, so today I will display remote address using Nginx web server. ...
Determine mountpoint filesystem type using core stat utility which is expected to exist on every operating system. ...
Delay the start of the systemd service at boot. ...
Display Raspberry Pi serial number using standard command-line utilities. ...
Use openssl utility to determine cipher used to encrypt the private key. ...
Display information about NVMe storage device. ...
Share USB device over network using usbip utility. ...
Create and encrypt RSA or EC private key using general utilities. There are multiple possibilities, so let me sum it up. ...
Create and encrypt RSA or EC private key using dedicated utilities. ...
Inspect LVM history using metadata archives. ...
Keep a list of permanent ARP entries using the arp utility. ...
Extend LVM logical volume without free space on the root partition. ...
Configure and use LVM thin provisioning. ...
Define control domain memory inside XCP-ng. ...
Take the advantage of dynamic DNS resolution in an open-source version of NGINX. ...
Use internal DietPi utilities is to switch from a Dropbear to OpenSSH Server. ...
Alter Log4j configuration to rotate Kafka logs. ...
Enable memory cgroup on a Raspberry Pi with DietPi an extremely lightweight Debian operating system. ...
DietPi an extremely lightweight Debian OS is using cgroup v2 on Raspberry Pi, but this causes warning when using snap packages… ...
How to use tmpfs for temporary directory (/tmp). ...
Resize live tmpfs filesystem. ...
Use column utility to align simple MariaDB output like variable list. ...
Relay all mail to an external account which can come in handy in your lab environment. ...
Perform HDFS audit logging. ...
Create Yarn nodes whitelist. ...
Save namespace on namenode and perform checkpoint on secondary namenode. ...
Inspect Hadoop configuration using command-line. ...
Mount HDFS as a local file system. ...
Create Hadoop data nodes whitelist. ...
The Hadoop cluster enters safe mode during the name node startup till the basic indicators are met and later in case of emergency, which means that the cluster enters read-only mode. ...
Keep track of network latency using SmokePing on Debian Bullseye. ...
Use boot parameters to limit the number of available processors. ...
Decommission Yarn node with minimal impact on the running applications. ...
Use dnsmasq directly to manage custom DNS records on a Pi-hole instance. ...
Decommission HDFS data node with minimal impact on the running applications. ...
Create LXD image from an existing snapshot. ...
Display Hadoop cluster report. ...
Disable Pi-hole query rate-limiting in a local lab as rate-limited queries get a REFUSED reply and are not further processed by FTL. ...
Install DNS lookup utility to perform basic DNS lookups. ...
Hadoop has a native implementation for certain components, but sometimes it does not load automatically. ...
Update Hadoop heartbeat interval to mark data node as dead at the predefined period of time depending on your requirement. ...
Perform reverse DNS lookups to map addresses to names. ...
Validate Hadoop configuration XML files. ...
Determine which SSH public key was uploaded to the web service. ...
Configure Hadoop topology mapping using TXT DNS records. ...
Display IP address in a more readable format. ...
Let’s perform basic HDFS operations. ...
Switch from Dropbear to OpenSSH on DietPi. ...
Display current mappings for encrypted devices (LUKS) . ...
Open LUKS2 encrypted volume on a low memory device. ...
Alter or clear audited domains list on Pi-hole instance. ...
Create a basic Hadoop cluster to play with it. ...
Export block devices list as JSON and parse using jq utility. ...
Configure MariaDB server to log slow queries. ...
Use awk to parse apt history log and filter it. ...
Concatenate regular and gzip-compressed files at the same time. ...
Increase the maximum permitted number of simultaneous connections to the MariaDB server. ...
Load time zone tables into MariaDB server. ...
Simply update Grub on CentOS server. ...
Log systemd service state changes using rsyslog. ...
Use date utility to display current date time in different timezone ...
Start service on the privileged port as a regular user. ...
Update tar archive. ...
Access specific file occurrence in tar archive. ...
Use OpenSSL utility to encrypt or decrypt files. ...
Use systemctl to get process identifier for specified service. ...
Today I will extend the how to fix device excluded by a filter blog post to include information on how to wipe filesystem or partition-table signatures except for LVM2 members, which is a great idea for automation. ...
You can directly inspect kernel slab allocator statistics (/proc/slabinfo file) for detailed information on buffer, inode, dentry, or other caches in the Linux kernel, though slabtop utility will sort and pretty-print information in real-time. ...
Four different ways to disable Network Manager connectivity checks. ...
Sometimes I need to get the package URL on CentOS to store it using Nexus Repository Manager. At first glance, it is not very obvious how to display package URLs, but the actual process is very simple. ...
Use Nginx reverse proxy to add Content-Security-Policy header and disable phoning home or external analytics inside web-browser. ...
Use tsflags plugin to test upgrade process before executing it. ...
Using passive adapters to connect DisplayPort output to HDMI or DVI input is problematic with wide-screen monitors as these adapters supports a maximum resolution of 1920×1200 at 60Hz. This issue can be alleviated by adding a specific mode to the set of valid output modes. ...
Write an operating system to microSD card using Raspberry Pi Imaging Utility. ...
Today, I will connect the secondary encrypted hard disk from the previous Ubuntu installation to copy personal data, so there will be a problem with overlapping LVM names. ...
Suppress SSH banner when executing ad-hoc commands. ...
Export every LXD instance at once. ...
Configure a lightweight compressed cache for swap pages to mitigate the performance impact of swapping on your desktop. ...
Use basic Linux utilities to list file names and their contents. ...
Configure compressed swap using zram device at system boot. ...
Take advantage of compressed RAM based block devices to create temporary filesystems and swap disks. ...
Fix “device excluded by a filter” LVM error. ...
Create the simplest possible firewall using nftables framework with relaxed rules that will allow all outgoing traffic, incoming ICMP echo requests, and ssh connections. ...
Display physical volumes associated with the volume group. ...
Use templates inside shell scripts by substituting environment variables. ...
Use versionlock plugin to protect packages from being updated on the CentOS operating system. ...
I have already described how to strace PHP-FPM processes, but you can also display a strace summary to get detailed information about count time, calls, and errors for each syscall. ...
Determine and set JAVA_HOME to execute Java command-line applications. ...
Monitor file system events to restart service on every configuration change. ...
Fix multipath daemon error about missing path when using VirtualBox. ...
Use varnishlog to log specific Varnish requests. ...
Varnish Shared memory Log can put a major strain on the disk (I/O write operations). The solution is to store it on the virtual memory filesystem. ...
Configure systemd service to be restarted in case of failure. ...
Use needrestart utility to determine which services need to be restarted after the upgrade. ...
Use Filebeat to deal with many small log files. ...
Define custom Nginx log format to store SSL cipher and protocol information. ...
Use FUSE (filesystem in userspace) to access rdiff-backup repository. ...
Use HAProxy with Lua to enforce dynamically generated passwords for basic authentication. ...
Today, I will show you my personal shell prompt, so you could define your own custom bash prompt. ...
Execute rc.local shell script during boot using systemd compatibility generator. ...
Perform shell script analysis using shellcheck, a shell script static analysis tool. ...
Display packages that were installed automatically to satisfy various dependencies and are no longer required. ...
Calculate Elasticsearch’s average documents number in recent days using a shell script. ...
Use systemd service to automatically extend existing ext4 filesystem on boot or on-demand to optimize virtual machine configuration. ...
Retry Elasticsearch shard allocation that was blocked due to too many subsequent allocation failures. ...
Format and beautify Nginx configuration using dedicated utilities like nginx-config-formatter, nginxbeautifier, and crossplane. ...
The simplest possible solution to display bind mounts. ...
Calculate Elasticsearch hit ratio using command-line curl utility. ...
Dockerize rdiff-backup to create a personal single-user instance with SSH and web interface provided by rdiffweb. ...
Increase the number of connection attempts when using ansible utility. ...
Display, search, create or delete the Kibana index pattern using API. ...
Alter Ubuntu desktop configuration using gsettings utility. I will use it to change the number of seconds the desktop computer needs to be inactive before it goes to sleep. ...
Inspect parent processes to determine whether shell script or specific process has been executed locally, remotely, or by any other application. ...
Today, I will show you how to manage RPM keyring on the CentOS operating system using a real life example. ...
SmokePing 2.7.3 needs an update to use the SSH probe on Debian Buster. ...
Determine available authentication methods on the specified OpenSSH server. ...
Create custom Bourne Again SHell package to disable network redirections and enhance system security. ...
Use simple HAProxy configuration hacks to serve a single static file. ...
Inspect OpenSSH client configuration to search and display configured hosts. ...
Merge multi-process HAProxy statistics using GNU Awk. This is a duct tape solution, as you should definitely use Lua. ...
Merge multi-process HAProxy statistics using Lua. ...
Install CouchDB on Debian Buster. ...
Reset RabbitMQ node configuration. ...
Generate password hash for CouchDB administrator. ...
Display RabbitMQ/Erlang version using essential utilities. ...
Use OpenResty to perform health checks in your cloud environment as it incorporates Nginx, Lua and comes with batteries included. ...
Alter configuration for specific yum repository. ...
Specify systemd startup timeout option to prevent service start operation from timing out. ...
Perform basic Elasticsearch 7.x operations. ...
Install Elasticsearch 7.x on Debian Buster. ...
Protect Netdata using basic access authentication. ...
Disable specific yum repository to prevent particular packages from installation or update. ...
Use HAProxy stats socket to determine current application status. ...
Access your files stored in OneDrive using rclone command-line program to sync files and directories to and from cloud storage and FUSE Filesystem in Userspace filesystem. ...
Suppress message of the day for specific or multiple users. ...
Manage and display system news using a simple but effective utility. ...
Display LWN news using the message of the day framework. ...
Protect the operating system against accidental shutdown or reboot. ...
I have already described how to create VLAN interface, but things have changed over time, so I decided to update the know-how. ...
Install RabbitMQ message broker to queue and exchange messages. ...
Use to drctl-tools to parse Debian package information using the Debian control file format (the dctrl format). ...
Use branch name to automatically add Jira issue ID to the commit message. ...
Use regex to define server names when using Nginx to dynamically serve or route traffic. ...
Store contents of every tmux pane using a shell script. ...
Store contents of tmux pane to a file to keep the history or inspect recently executed commands. ...
I have already described how to inspect a pipeline, but today I will show you how to write a shell script that will help you reconstruct a whole pipeline when all you got is a process ID that is part of the pipeline. ...
A pipeline is a sequence of multiple commands separated by the control operators. It is easy to understand as long as you see the whole picture, but I will show you how to inspect it when you have a single process ID. ...
Use bash redirection and process substitution to programmatically distinguish standard error from regular output. ...
Isolate the problem and strace multiple PHP-FPM (FastCGI Process Manager for PHP) processes to identify the culprit. ...
Stop search engines from crawling website using simple Nginx location directive to provide robots.txt file. ...
This is an extension to an older blog post on how to mount WebDAV share using systemd as this proved to be a very reliable method that is easy to mark as a dependency for other services. ...
Modify system identification message that is printed before the login prompt. ...
Gitea currently does not provide packages for ARMv7, which was commonly used for Raspberry Pi 3. This is not a problem as software compiled for specific ARM instructions set should work on more recent architectures thanks to backward compatibility with earlier ARM processors. ...
Match certificate and its intermediate counterpart by using X.509 key identifier extension. ...
Use openssl utility to display and verify the certificate chain for a specific domain. ...
Use a simple Go application to generate RabbitMQ password hash. ...
Send output to multiple commands using tee utility and bash process substitution. ...
Write a simple Bash shell script that will allow you to specify the same option multiple times or provide multiple arguments to a single option. ...
Use netstat, ss or files inside proc filesystem to count TCP connections. ...
Generate and print sequences of numbers to perform specific operations using command-line or shell script. ...
Create a shell script to determine how long a specified remote server or device was offline. It is not designed to substitute monitoring solutions but to determine how long it will take to reboot the server or device. It is using convert seconds to human readable time code to display results. ...
Capture column from command output and convert it to a row to pass it further. ...
Enforcing your own security policy that defines users, SSH keys, and sudo configuration inside custom templates based on official images in Google Cloud requires that you disable Google Accounts service, so it won’t get in the way. ...
Pretty print size in bytes using AWK. ...
These are easy mistakes to make as the bash builtin read command will terminate with the error exit code on the end-of-file condition and use Internal Field Separator to split the line into words. It is kind of tricky, but it is worth knowing how to deal with such problems. ...
Display memory used by processes in human-readable form using ps and awk utilities. ...
Today, I will show you how to get and display user details using a shell script. This work is based on a Python-based solution by David Green and located at bitbucket/nordapi. ...
Sometimes it is very convenient to define shell function and execute it remotely. ...
Perform a dictionary attack on the forgotten LUKS passphrase to access the encrypted device. ...
Compare two files byte by byte using cmp file comparison utility. ...
Inspect Redis internals using UNIX socket and Python script without external dependencies. ...
Use simple shell function to instantly create known_hosts entries for specified host, including its IP address and remove outdated public host keys. ...
Monitor PHP-FPM (FastCGI Process Manager) pool using curl utility, cgi-fcgi application or slightly modified Python script that was used to display PHP-FPM pool information. ...
Display PHP-FPM (FastCGI Process Manager) pool information using UNIX socket and Python script. I thought it would be easy to write a simple FCGI client. Apparently not, but it was an exciting and rewarding experience. ...
Determine maximum LUKS key file size or maximum interactive passphrase length. ...
Use find a utility to move files based on specific time criteria. ...
Use openssl command-line utility to display TLS server extensions. ...
In a blog post a month ago, I described how to use a terminal to display servers recommended by NordVPN, but the same result can be achieved by using public API service. It is not officially documented, so let’s play with it. ...
The simplest possible way to create a Debian package is to use defined package metadata and prepared target directory structure. ...
I have already described a simple way to manually configure Network Manager and automatically import NordVPN servers, so today, I will explain how to pretty print servers recommended by NordVPN using terminal instead of web-browser. ...
Create a shell script to convert seconds to human-readable time. I have reused part of an old shell script used to pretty-print system uptime to built it, as this code proved to be useful on several occasions. ...
Very rarely and often by mistake, you can end up with a deleted file that is still used by some process, which is likely writing to it, so the used space cannot be freed. ...
Install Prosody, an Open-source and modern XMPP communication server. ...
Schedule a one-time task at a specific time or below defined system load using at utility. ...
Execute paste utility to merge lines using tab character as a delimiter, expand to convert tabs to spaces, and column to format input into multiple columns. ...
Display processes using the most CPU or memory using nothing more than basic Linux utilities. ...
Use a shell script to count separate line entries inside a pipe to see how many entries got filtered out. It can be useful in some scenarios, especially for testing. ...
Recently, I have parsed logs of several applications to generate custom weekly reports. It was a fascinating exercise. ...
Make iptables configuration persistent using essential system utilities or a designated boot-time loader. ...
There are those rare situations where you do not know the public key required to verify repository signatures but want to add a repository and a public key used to sign it. Hopefully, there is an easy answer to that question. ...
Install and configure localepurge package, which provides a fancy shell script to recover disk space used by useless localizations. ...
Configure and enable command-line tab completion for known SSH hosts to ease day-to-day operations. You do need to configure or enable this on Debian-based distributions, but it is good to know how to do this as you will never know when it will come in handy. This article is an extension of adding the SSH menu to the Unity launcher blog post. ...
This technique is widespread. To be honest, it is more common than I initially thought, so I will show you how to create a single shell script that will display, create or destroy a temporary file system depending on the name used to execute it. ...
Configuring and using additional repositories requires APT public key management to validate the Release file and downloaded packages. ...
Find a symbolic link by the target name. It sounds simple and it definitely is. ...
Determine how long it would take to copy data between directories. ...
Verify file integrity using the GnuPG signature without touching your local GnuPG configuration. ...
Create a shell script for a cron job with hidden debug information shown only when executed inside the terminal. ...
Logrotate does not support hourly schedule, but this is an easy task to accomplish. ...
Use find and grep commands to search for directories that contain one or multiple files with specific content. ...
Display dependencies to inspect which packages are required for a given application. ...
Whitelist or render inoperative any USB device to secure your personal belongings. ...
Create an iptables firewall using custom chains that will be used to control incoming and outgoing traffic. ...
Detect and log changes in the list of mounted filesystems (/proc/self/mountinfo file). ...
Use GNU Bourne-Again SHell builtin or standalone time command to determine process execution time. ...
Use cron service to execute additional commands as the specified user using cron during system startup. ...
I am using the lightline status line with the Solarized color scheme inside Vim text editor. ...
Serve files from memory with a fallback using the Nginx HTTP server. ...
Create the simplest possible iptables firewall with quite relaxed rules that will allow all outgoing traffic, incoming ICMP packets, and ssh connections on the eth0 interface. ...
Define and use a variable to dynamically choose HAProxy backend depending on the URL parameter, HTTP header field, and cookie value. ...
I have described the differences between the old and new free output format, so now I want to mention how to execute the former free version on Debian Stretch using LD_LIBRARY_PATH environment variable to temporarily substitute a different library for this particular execution. ...
Block particular IP addresses on HAProxy load balancer using simple Access Control List. ...
Use dpkg to pretty print package dependencies. ...
Check locally stored SSL certificate using essential utilities like openssl and curl. This knowledge is especially useful when you want to prepare an SSL certificate for a load balancer. ...
Create a certificate signing request and use it to generate an SSL certificate. I strongly suggest reading my two earlier blog posts about self-signed SSL certificates and private keys as these contain useful information. I will describe three different ways to generate a certificate signing request. ...
The free utility is used to display the amount of free and used memory in the system. Debian Stretch provides an upgraded package. Output format has changed, and available memory is calculated using a different method, so let’s see what we can do with these modifications at this moment. ...
Install Pi-hole, a network-wide ad blocking on your own Linux hardware. I have used it on Debian Stretch, but then moved to a small Raspberry Pi, which now acts as DNS and DHCP server. ...
Enable HTTP/2 on HAProxy 1.8 and temporarily fix the bad request problem with the Nginx backend using FastCGI/uWSGI. ...
You can still connect to the Microsoft SQL Server 2014 as a member of the sysadmin server role using single-user mode when you are locked out of the database. ...
Query APT configuration to inspect specific options or create universal Debian utilities. ...
There are many different ways to verify IPv4 address inside a shell script, but many of these are complicated or incomplete. I will describe a simple and verbose way to check IPv4 address using ipcalc utility. ...
I am using a simple shell script to manage OpenSSL known_hosts file as it requires many small updates due to constantly changing host keys on a dynamic virtual server. ...
Keeping an eye on a constantly changing APT cache can be quite tedious, so automate this task and free up your time to focus on other projects. ...
Clear the APT cache to reclaim disk space used by the downloaded packages. ...
Disable APT cache to conserve disk space on a small Debian based embedded system or a custom-built live USB system that can be easily booted. ...
I am an enthusiast of the uWSGI project. You are still not limited to it as you can use fcgiwrap, a very lightweight and straightforward FastCGI wrapper for CGI scripts that do not require additional configuration. ...
Keep track of network latency using SmokePing, uWSGI application server, and Nginx HTTP server. SmokePing supports many configurable probes, alerting, and live charts accessible through a web browser. It was created by Tobi Oetiker, which is known for RRDtool an Open Source data logging and graphing system for time series data. ...
I am using curl to verify redirects and display real destination URL, and you should try it too. ...
Use curl utility to verify the HTTP response code for the given URL. ...
It is rarely mentioned, but you can use repository snapshots to download and install old and obsolete packages on already unsupported or even current Debian distributions. ...
Today, I will create a simple proof of concept shell script to display the message provided from standard input or parameter. It could be used as a template to write shell scripts that can be executed in a pipe or as a standalone application. ...
Two years ago, I described a simple way to display established TCP connections using ss command. Today I will use lsof and gawk to pretty print network connections. ...
It is a matter of personal preference whether you use current or former network device naming convention. I am more accustomed to the latter and will configure the operating system to retain the old behavior. ...
It is widespread to display and store command output using tee utility, but taking full advantage of it requires applying a slightly different error catching strategy. ...
Create a simple shell script that will read user message as a parameter or directly from standard input when used in the pipeline. ...
Today, I will show you how to stop referral spam using simple nginx directives to return 403 Forbidden HTTP status code after encountering troublesome referer hostnames. ...
Use openssl command-line utility to calculate and display days till the certificate expiration. ...
List configured APT data sources for binary packages using apt-cache utility. ...
Use openssl command-line utility to display common name, certificate issuer, alternative names, start/end dates. ...
Today, I will describe how to display environment variables associated with the running process. ...
Display established connections broken down by a host. ...
Identify and print processes using swap space to get a better understanding of the Linux operating system. ...
If you have ever wondered how to perform real-time performance monitoring on a number of virtual hosts scattered across multiple locations, then install and use netdata application. ...
There are circumstances when you want to ensure a particular package version during the setup process. I will show you a simple method to verify the package version suitable for sourcing into a shell script. ...
There are at least several ways to determine when the process was started to help you investigate and trace potential issues. I will briefly introduce four different methods to choose the most useful one. ...
There are many applications that share the same source package, so I will show three different ways to print the name of the source package. ...
Knowing how to determine when the last time package index files were updated can be beneficial when you least expect it. It is not something used every day but can be used to monitor or verify when apt-get update command was executed. ...
I am constantly moving between a fixed list of several directories daily. Using cd can be tedious at times, so I defined a shell function to quickly jump between a defined set of directories. ...
I am using tmux terminal multiplexer daily. It is an irreplaceable utility that eases everyday tasks as it lets you switch between multiple applications in one terminal. I will briefly describe my personal configuration setup. ...
I have already described a straightforward way to automatically login user at the console without touching the graphical user interface using Debian Wheezy, so today I will post an update for Debian Jessie as the whole process has changed considerably. ...
I have already described how to disable the touchpad when an external mouse is connected using the udev device manager, but today I want to share a simple shell script that I am using on Dell XPS 13 to disable/enable the touchpad using a single keyboard shortcut. ...
Dokuwiki is the best Open Source project I have ever used, so I have prepared a simple step-by-step guide to help you get started. It is relatively brief and concise as most of the code was already described in other blog posts found on this website. ...
Today, I will illustrate a simple way to check for specific command inside a shell script, which is quite simple as it uses only shell built-in command utility. ...
Today, I want to briefly describe a simple way to check for a specific package inside a shell script. ...
I wrote a simple application to explain the current UMASK value. It was a while ago, but I want to share it with you as it is quite a useful utility. ...
Once in a while, I have a problem with Intel Corporation Dual Band Wireless-AC 7265 on Dell XPS 13 during the resume process as it just stops working and won’t connect to any network. The solution is to simply reload the kernel module. ...
It was almost three years ago when I wrote about manual pages. Moving forward, I want to share a simple and useful shell script to search through manual pages. ...
I will show you how to configure the AWStats web-interface using the uWSGI application server and Nginx HTTP server, which is a very simple and straightforward process. ...
I have experienced a lot of trouble with Bluetooth sound synchronization. Most of the time, this issue was especially evident while watching movies. Fortunately, the solution is within easy reach. ...
A week ago, I illustrated a simple way to connect to the NordVPN server using Network Manager. Today I will describe a more advanced solution to automatically import NordVPN configuration using a shell script. ...
It is nothing fancy, but there are situations where it is beneficial to know how to identify and inspect command before execution. ...
It is easy to get names of distinct Debian releases as you can always examine these on the Debian Releases web page. I will do something more interesting and demonstrate how to do that using a simple shell script. ...
I was recently pointed out by Piotr Gabryjeluk that Iceweasel name was dropped (see Debian Bug report #815006). This caused a major inconsistency in the previous blog post. This is an updated version for Debian Jessie ...
Today, I will describe how to cause PostgreSQL clusters to reload their configuration files using four simple methods. ...
Since the beginning of this year, I have started using Seafile, and I absolutely love it as it offers simple data organization using libraries and reliable file synchronization between multiple devices with built-in encryption. Check for yourself as it is undoubtedly worth it. ...
This blog post is an update to the earlier PostgreSQL entries in which I will show you how to use continuous Write Ahead Log archiving to take advantage of the point-in-time recovery. ...
The GNU Privacy Guard is an essential application when you need to ensure the confidentiality and origin of the information, so it helps to protect your privacy and the people you communicate with. ...
There are cases where I prefer to install and use Gnome fallback mode (Gnome Flashback in recent system versions) instead of full-blown Unity desktop. I will give you simple instructions on how to change the default session manager. ...
It is an interesting thing to know how to parse and process Linux Software RAID events. It is also beneficial as you can automatically take appropriate action immediately after a certain event occurs. ...
Sometimes I want to monitor and log particular PostgreSQL statements or execute other kinds of external action. I am using the notify mechanism and slightly modified sample application found in the database documentation to achieve this. ...
Do you want to use the latest version of Iceweasel, also known as Firefox? Then add the repository provided by the Debian Mozilla team and choose between release, beta and aurora version. This blog post is obsolete. Please read How to use a recent version of Firefox in Debian Jessie instead. ...
I am using Sublime Text to write this blog post. It is a great piece of software. However, it does not contain a desktop file, so you need to create it separately. ...
I am currently using the latest Ubuntu on Dell XPS 13. It works great, and using it is a real pleasure. However, after a while, I got an idea to add the SSH menu to the Unity launcher for enhanced usability. ...
I had an unexpected incident last week as one of the hard disks in my server failed. This device was a part of a software RAID mirror, which created an opportunity to describe the whole process. ...
Today, I will show you how to put every connected USB storage device in read-only mode using udev dynamic device management, blockdev utility, and systemd service unit configuration. ...
Human memory is sometimes unreliable, so it is not always possible to answer in the same way to the configuration questions. Fortunately, this process can be automated using debconf utilities. ...
Debian Jessie is using systemd as the default system and service manager. I will not argue about it, but instead, I will briefly introduce the whole thing. ...
I wrote a simple shell script to pretty-print disk space used by PostgreSQL databases while examining database object size functions. You can benefit from this too by inspecting used SQL statements. ...
Several months ago I have shortly described how to close a non-responsive ssh session, which comes in handy at times. Today I will describe how to close every active ssh session by inspecting existing pseudoterminals. ...
It is easy to use uptime command, but custom shell script is definitely a more interesting solution as it provides more detailed information. ...
I have unexpectedly experienced an issue with a couple of broken packages, which was easily solved using debsums utility. ...
I want to automatically log out the user from the login shell after a defined period of inactivity but leave X Window Terminals untouched. This will allow me to enhance security slightly, as I will not accidentally leave the superuser session running for a long time. ...
It is easy to overlook orphaned files without an assigned existing owner or group after moving large amounts of data. Fortunately, it is easy to spot these files using the find utility. ...
I often want to save a recently executed command to the personal log file for further reference, so let’s do it. ...
On Sunday 29th April 2012, I have described How to check dd’s progress using User-defined signal 1. Today, I will extend this topic further using the proc filesystem. ...
Using find command is not always the fastest way to search for specific files. The better method is to use mlocate utility, which uses its own file database and provides only user-accessible results. ...
Sometimes I want to inspect and verify queries made by an application or hunt a bug that involves more complex queries. The essential part of this process requires altering PostgreSQL server configuration to log SQL statements. ...
Simple shell script that will iterate through the directories in the PATH variable and print only files identified as scripts. ...
I am constantly on the move, so sometimes I need to quickly verify my external IP address, as I do not want to accidentally block myself on some kind of firewall. ...
I always asked myself how to password protect GRUB entries on an encrypted notebook to lock down the boot loader and protect it from unauthorized access. ...
It is well described how to verify file existence or type, but there is much more information that can be easily verified inside shell script using nothing more than simple stat command. ...
Sometimes I want to access a private server at home from a different network while being on the go. The easiest way to do this is to use autossh utility to create a secure and persistent reverse SSH tunnel to the publicly available server. ...
Do you want to use the latest version of Iceweasel, also known as Firefox? Then add the repository provided by the Debian Mozilla team and choose between release, beta and aurora version. ...
Sometimes I need to check the installed package version, compare it with the available version, or verify that the correct version is already installed. I will show you how to quickly perform these checks. ...
Default Debian installation does not include VPN support inside the Network Manager applet. The reason behind this decision is probably the variety of available solutions. ...
Since Debian Jessie installation, I have encountered Hangcheck timer elapsed error. It is a really nasty bug as the only way to escape frozen X Window System is to reboot the whole operating system. ...
Today, I tried to visualize how many processes each user is running using a bar chart. The catch is that I want to see results in a plain terminal, which makes things more interesting. ...
Yesterday, I left a long-running copy process between two external USB hard-drives. I did not want to assume anything, so I created a simple shell script to ensure that the whole process went smoothly. ...
I have already written a blog post about useful Bourne Again SHell key sequences, so today, I will touch on another important aspect of the daily routine – the history. ...
Recently, I was searching for an easy to manage VNC service to use it at home. After a short while of consideration, I decided to install TigerVNC and manage it using Monit. ...
Today, I will show you how to create a simple shell script to read and print interface statistics on the Cisco Catalyst switch using the SNMP protocol. ...
Recently, I have encountered an interesting issue, as I could not perform specific database operations due to unwanted and active sessions using the database. Thus, I will briefly note the solution for further reference. ...
This weekend, I have spent some time investigating SSL certificate-based authentication and implementing it in Kolab web-based user interface. This topic is fascinating but definitely too broad to be briefly described in a single blog post, so do not look at it as a complete solution, but treat it only as a proof of concept. ...
After a longer period of time, I have decided to install Kolab and use it as a personal information manager. The installation process went as expected until the setup process tried to install the Roundcube database and failed miserably. ...
I have discovered org-mode in the last year but have been using it for the last two months with increasing enthusiasm and commitment. I will be honest and tell you that it is the sole reason to learn and use Emacs on daily basics. ...
If you are wondering how to count only local users ignoring system accounts, I will give you a concise and straight answer. ...
Seven days ago I have published a shell script to highlight text in the terminal using sed or ssed. Today I want to extend the idea and colorize specified strings or simple regular expressions using just bash, getopts and ssed respectively. ...
I have been working on a simple shell script to highlight text in the terminal for the last hour. At first, I looked at it from the wrong angle, but after a short break, I finally realized the simplest possible solution. ...
I have recently switched to OpenBox, so today, I will use dynamic menus to integrate Firefox bookmarks with an existing OpenBox menu. ...
You have probably already noticed my favorite way to overcome the sudo redirection issue, but if you haven’t, then I will write it down here for further reference. ...
Today I will shortly describe how to set up Raspberry Pi as a tiny NAS server. I am using one at home daily, and it is a handy appliance. ...
By default dmesg command print kernel ring buffer using the timestamp for each logged message. It is easy to change this behavior and display date/time in a human-readable form using just one additional parameter. Still, sometimes it is not supported, so I will shortly touch upon this topic. ...
If you ever wondered how to determine whether the processor is 64-bit capable, then I have a simple and straight answer for you. ...
Recently I needed to setup software RAID1 during Debian installation process. As it turned out, this process was simpler then I initially expected. I will shortly describe it here using screen-shots captured during initial tests. ...
A couple of days ago, I was asked how to check the last mount time of the ext2/ext3/ext4 filesystem. The solution is straightforward as it does not require anything more then tune2fs utility. ...
It is straightforward to display available updates using an application with a graphical user interface, but not so obvious to do it by using shell commands only. I will shed some useful light on the subject so we could both benefit from it. ...
I am playing with Linux Virtual Servers in the Linode Cloud for the last several days and a couple of times wanted to disable IPv6 for testing purposes. ...
After writing the previous blog entry, I started to think about how to specify page section when opening the manual page. It is a simple but quite interesting issue, so I quickly got curious and wrote this post to describe a straight solution. Just to be clear – I need to mention that I am not writing about section numbers describing distinct subject areas but just page sections, such as NAME, SYNOPSIS, DESCRIPTION, AUTHORS, and so on. ...
I was wondering how to read the total CPU usage of the group of processes. Then I came with a straightforward solution using top and awk commands. ...
Re-read partition table without machine reboot using partprobe utility which is a part of parted package. ...
A couple of months ago, I published a short script to backup MySQL databases. Today I created a simple shell script to backup selected directories. ...
Change the MAC address of an Ethernet interface and make this change permanent. I will briefly explain how to do this using standard commands and one particularly useful tool MAC Changer. ...
Recently I was wondering how to automatically set up an external monitor without using desktop utilities as I don’t like to configure it each time. This question provided me a lot of fun as it opens a couple of interesting possibilities. ...
Recently battery in my notebook started to behave erratically. It will charge only to 70-80% of its maximum capacity. I suspect that it is probably slowly dying, so I will have to replace it soon, but at first, I will look at several utilities to monitor battery capacity. ...
Simple shell script to backup MySQL databases. ...
To change the data source name, you need to check its current value and then issue single rrdtool command. ...
I recently needed to know the UUID (universally unique identifier) of my bootable USB root partition. It is a better way to distinguish storage devices because device names can change depending on the connection order. ...
This post contains notes on this topic in the form of a concise guide. ...
Check the progress of the dd process. ...
Recently I run into small problems related to PHP. Problem A – sqlite.so The first one was a PHP warning: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/sqlite.so' - /usr/lib/php5/20090626/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP tried to load sqlite.so from /etc/php5/conf.d/sqlite.ini (php5-sqlite package). $ dpkg -L php5-sqlite /. /etc /etc/php5 /etc/php5/conf.d /etc/php5/conf.d/sqlite3.ini /etc/php5/conf.d/pdo_sqlite.ini /etc/php5/conf.d/sqlite.ini /usr /usr/share /usr/share/doc /usr/lib /usr/lib/php5 /usr/lib/php5/20090626 /usr/lib/php5/20090626/pdo_sqlite....
Display established TCP connections inside the terminal. ...
Execute a set of commands inside each active jail. ...
From time to time I need to backup/restore OS on the CF card using Windows machine. ...
Managing SPS switches could be real fun if you use expect to automate such tasks. ...
Get rid of spaces in file/directory names. ...
Using KDE notification area within a shell script gives a lot of useful possibilities as you can easily display feedback from running services, other scripts, log analyzers. ...