Quantcast
Channel: nixCraft
Browsing all 256 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

How to ping and test for a specific port from Linux or Unix command line

I wanted to see if a specific port of a desktop computer or server is open from a Linux or Unix command line shell. How do I ping a specific port? Is it possible possible to ping an 192.168.1.254:80 or...

View Article


Image may be NSFW.
Clik here to view.

How to use sed to find and replace text in files in Linux / Unix shell

I am a new Linux user. I wanted to find the text called "foo" and replaced to "bar" in the file named "hosts.txt." How do I use the sed command to find and replace on Linux or UNIX-like system?

View Article


Delete a non-empty directory when you get directory not empty error on Linux

I am trying to remove a directory named data in my $HOME. However, I am getting an error that read as 'rmdir: data/: Directory not empty'. How do I delete a non-empty directory in bash terminal running...

View Article

Image may be NSFW.
Clik here to view.

How to unzip a zip file using the Linux and Unix bash shell terminal

I grabbed a master.zip file from the Github public repo on my Linux VPS hosted at AWS. How do I unzip the file using bash ssh terminal? How can I unzip a file on Ubuntu/CentOS/Debian Linux/UNIX-like...

View Article

Image may be NSFW.
Clik here to view.

How to login with root password when using Ansible tool

I need to run a Linux command over 20 servers using a root user and password in Ansible too. How do I pass a user and password in Ansible over ssh based session? How can I set a default Ansible...

View Article


Image may be NSFW.
Clik here to view.

How to use the cURL command to do a POST data to fields on Linux or Unix

How do I use the cURL command on Linux or Unix to post data i.e. upload something on Linux or Unix? How do I make a POST request with the cURL Linux command-line to upload file?

View Article

Image may be NSFW.
Clik here to view.

How to count total number of word occurrences using grep on Linux or Unix

I want to find out how many times a word (say foo or an IP address) occurs in a text file using the grep command on Linux or Unix-like system?

View Article

Image may be NSFW.
Clik here to view.

How to extract multiple tar ball (*.tar.gz) files in directory on Linux or Unix

I have tried tar -xvf *.tar.gz command, but getting an error that read as:tar (child): *.gz: Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child...

View Article


Image may be NSFW.
Clik here to view.

How to configure Nginx SSL/TLS passthrough with TCP load balancing

How do I configure SSL/TLS pass through on Nginx load balancer running on Linux or Unix-like system? How do I load balance TCP traffic and setup SSL Passthrough to pass SSL traffic received at the load...

View Article


Image may be NSFW.
Clik here to view.

How to allow root login from one IP address with ssh public keys only

I am using MacOS on the desktop and Ubuntu Linux on the server. I disabled root login over ssh and enabled ssh based public key login. However, I recently added second Ubuntu server. I need to sync...

View Article

Image may be NSFW.
Clik here to view.

How to prevent unprivileged users from viewing dmesg command output on Linux

I want to restrict both normal users and root user inside LXD container "hypervisor" from viewing and using dmesg command output. How do I prevent non-root (unprivileged) Linux users from viewing the...

View Article

Image may be NSFW.
Clik here to view.

How to prevent sed -i command overwriting my symlinks on Linux or Unix

I recently ran a command 'sed -i 's/CONFIG_1/CONFIG_OPT_2/g' /etc/nginx/sites-enabled/*.conf' on a Debian Linux server. However, the sed command destroyed the link and created a regular file in place...

View Article

Image may be NSFW.
Clik here to view.

How To Patch and Protect Linux Kernel Stack Clash Vulnerability...

A very serious security problem has been found in the Linux kernel called "The Stack Clash." It can be exploited by attackers to corrupt memory and execute arbitrary code. An attacker could leverage...

View Article


Image may be NSFW.
Clik here to view.

How to use or specify multiple IP addresses in iptables source or destination...

I need to specific multiple IP address in iptables using Linux script. How do I create a rule that uses multiple source or destination IP addresses ?

View Article

How to add new brick to replicated GlusterFS volume on Linux

I have a three server replicated volume setup (scalable network filesystem for cloud and VMs). I need to add one more server. How do I add a new a new brick to an existing replicated volume on a Debian...

View Article


Image may be NSFW.
Clik here to view.

How to shutdown / reboot the remote Linux server from the CLI

I am a new Linux sysadmin. How do I remotely shutdown or reboot the server from the CLI?

View Article

How to install route command on CentOS / RHEL 7

I am trying to use command on a CentOS Enterprise Linux/Red Hat Enterprise Linux version 7 (RHEL 7). But, I am getting the following error:     bash: route: command not found How do I install router...

View Article


Image may be NSFW.
Clik here to view.

How to install or compile GIMP filters/plugins/extensions on Linux

How do I install or compile new GIMP filters on a Ubuntu or Debian or Fedora or CentOS Linux desktop system? The post How to install or compile GIMP filters/plugins/extensions on Linux appeared first...

View Article

Image may be NSFW.
Clik here to view.

How to import a OpenVPN .ovpn file with Network Manager or Command Line in Linux

I have installed an OpenVPN server on a Debian Linux server. I have a client.ovpn file for my VPN server. How do I use it with Network Manager GUI? Is it possible to install or import client.ovpn file...

View Article

Image may be NSFW.
Clik here to view.

How to install Firefox 59 Quantum on a Linux

My Linux distro comes with Firefox ESR. I read Firefox 59 is over twice as fast as Firefox from 6 months ago, built on a completely overhauled core engine with brand new technology. How do I installed...

View Article
Browsing all 256 articles
Browse latest View live