≡ Menu

Linux

Unix / Linux: Remove duplicate lines from a text file using awk or perl

I have a text file with exact duplicates of lines. I need to remove all those duplicates lines and preserves the order too on Linux or Unix-like system. How do I delete duplicate lines from a text file?
[click to continue…]

Linux: lxc forcefully stop and kill container

I want to stop the application running inside a container. I issued lxc-stop -n myapp but the command is not returning to the shell prompt, and my lxc container entered in hang state. How do I kill my container running on Ubuntu Linux host?
[click to continue…]

KVM libvirt assign static guest IP addresses using DHCP on the virtual machine

I am using KVM/libvirt on Linux operating system and how do I assign static IP address using dnsmasq dhcpd server for my default virtual network switch?
[click to continue…]

How to copy permissions from one file to another on Linux

I need to copy or clone file ownership and permissions from another file on Linux. Is there a bash command line option to clone the user, group ownership and permissions on a file from another file on Linux operating system?
[click to continue…]

How to configure Nginx with free Let’s Encrypt SSL certificate on Debian or Ubuntu Linux

How do I secure my Nginx web server with Let’s Encrypt free ssl certificate on my Ubuntu Linux 14.04 LTS or Debian Linux 8.x server?
[click to continue…]

How to find out Raspberry Pi GPU and ARM CPU temperature on Linux

I am using a Raspberry PI 2/3 credit size computer. How do I find out my GPU or ARM CPU temperature from Linux operating system command line option?
[click to continue…]

How to upgrade OpenSSH 7.0 to 7.2 on a OpenBSD Unix and Linux

OpenSSH version 7.2 has been released. How do I install or upgrade my existing OpenSSH version to 7.2 on a OpenBSD unix operating system?
[click to continue…]

How to run a command or script after running apt-get command on a Debian or Ubuntu Linux

How do I run custom command after ‘apt-get upgrade‘ or ‘apt-get dist-upgrade‘ on a Debian or Ubuntu Linux based system? How do I hook a script to apt-get command on my Ubuntu Linux server?
[click to continue…]

A stack-based critical buffer overflow was found in the way the libresolv library (glibc) performed dual A/AAAA DNS queries. A remote attacker could crash or, potentially, execute code running the library on Linux. How do I patch and protect my server or workstation against the glibc getaddrinfo on Linux operating system?
[click to continue…]

How to reload sysctl.conf variables on Linux

I am new Linux system user. How do I reload all sysctl variables without rebooting my server?
[click to continue…]