Knowledgebase

Unix

Operating System

Articles

Curl Set User Agent Command on Linux or Unix A user agent is nothing but software agent that is acting on behalf of a user.  Change user agent with curl The syntax is as follows for the curl command: curl -A... Error: when trying to upload file using Nginx web server First, you need to edit the /etc/nginx/nginx.conf file by typing the vi command: $ sudo vi /etc/nginx/nginx.conf In HTTP (server/location) section add the... FreeBSD Change Hostname without Reboot Updated 9 November 2026 FreeBSD 14.4, 14.5 and 15.1 (from the FreeBSD Handbook and manual pages) To change the hostname on FreeBSD without a reboot, run two commands as root: hostname server1.example.com changes it immediately, and sysrc... How to Copy a Folder Recursively with scp, Exclude Files and Skip Existing Files Updated 4 November 2026 OpenSSH 10.2p1 (Ubuntu 26.04) and 9.9p1 (AlmaLinux 10), rsync 3.4.1 and 3.5.0 To copy a folder recursively, use scp -r. scp has no option to exclude files and no option to skip files that already exist: it always sends everything and overwrites... How to List Users on Unix, Linux, FreeBSD and macOS Updated 12 October 2026 Ubuntu 24.04 and 26.04, Debian 13, AlmaLinux 9.8 and 10.2 (tested), macOS 27 (tested), FreeBSD (from the FreeBSD Handboo To list all users on a Unix-like system, run getent passwd (Linux, FreeBSD and most other Unix systems) or print just the names with cut -d: -f1 /etc/passwd. Most of... How to Run awk on a File and Print the File Name Updated 18 October 2026 gawk 5.2.1 (Debian 13) and 5.3.0 (AlmaLinux 10.2), mawk 1.3.4 (Debian 13, Ubuntu 24.04 and 26.04) and BusyBox 1.37.0 awk To run awk on a file, put the file name after the program: awk '{ print $1 }' file.txt. To print the name of the file awk is reading, use the built-in variable... How to Schedule Tasks in Linux: Cron Jobs and Systemd Timers Updated 12 October 2026 cron 3.0pl1 on Debian 13, cronie 1.7.0 on AlmaLinux 10, systemd 257 timers and at 3.2.5 (all tested); the same commands To schedule a recurring task in Linux, add a cron job: run crontab -e, add a line such as 0 3 * * * /usr/local/bin/backup.sh (every day at 03:00), save and exit. Cron... How to Secure memcached Against DDoS Amplification Attacks Updated 30 September 2026 memcached 1.6 on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debian 13 In 2018, memcached servers that were open to the internet over UDP were used for record-breaking DDoS attacks: a small spoofed request made the server send a huge... How to backup FreeNAS configuration file and restore it? NOTE that this is NOT a back up of your data stored in your storage array(s) this is simply a back up of your FreeNAS configuration in the event of a failed boot usb.... How to change theme in Ubuntu 16.04/17.10? Updated 28 September 2026 Ubuntu 24.04 desktop (GNOME) Ubuntu 16.04 and 17.10 are end of life. On Ubuntu 24.04 (GNOME desktop) you change the look in Settings. Light or dark style and accent colour Open Settings ›... How to create FreeNAS Jails with iocage? iocage is a jail or container manager tool for FreeBSD. It is also available on FreeNAS based NAS system. It comes with some of best features and technologies the... How to patch Meltdown and Spectre vulnerabilities on FreeBSD Step 1: Find your current FreeBSD version #freebsd-version11.1-RELEASE-p4 Note down the current version. Step 2: Update your vulnerable system via a binary... How to patch Meltdown vulnerability on OpenBSD Unix? Patch Meltdown vulnerability on OpenBSD The Meltdown vulnerability backported to the OpenBSD version 6.1 and 6.2 (amd64) releases, and the syspatch update for version... How to set and use sudo password for Ansible Vault? You can create encrypted passwords with Ansible playbooks and use it. You need to pass  --extra-vars  variable to ansible-playbook. Let us see two different methods to... Installing KornShell (KSH) on FreeBSD Updated 22 October 2026 KornShell (KSH) is still common on older Unix systems and for scripting, even though most modern Linux systems default to bash. Installing it on FreeBSD is quick. What... Keeping FreeBSD Packages Up-to-Date If you’re new to FreeBSD, updating your installed software is essential. The pkg tool makes it easy to manage and upgrade software packages. This guide shows you a... Root Password on a Mac: Enable or Change It, and Change Passwords in Terminal Updated 11 October 2026 macOS 27 Golden Gate (man pages checked on 27.0.1, Apple documentation); Linux part tested on Ubuntu 26.04.1 A Mac has no default root password: according to Apple, the root user is disabled by default. For admin tasks you use sudo in Terminal, and it asks for your own... UnixBench: To gain system performance The goal of UnixBench is to present a basic sign of the performance of a Unix-like system; hence, various tests are used to test multiple aspects of the system's... What does rm -rf command do on a Linux or Unix? The rm command removes each given FILE on the command line. By default, it does not remove directories.  The syntax to delete the file for rm command is as follows:...