Most Popular

1500 questions
197
votes
3 answers

Difference between KVM and QEMU

I have been reading about KVM and Qemu for sometime. As of now I have a clear understanding of what they do. KVM supports hardware virtualization to provide near native performance to the Guest Operating sytems. On the other hand QEmu emulates the…
Abhishek Gupta
  • 2,105
  • 3
  • 13
  • 7
196
votes
9 answers

Check if array is empty in Bash

I have an array which gets filled with different error messages as my script runs. I need a way to check if it is empty of not at the end of the script and take a specific action if it is. I have already tried treating it like a normal VAR and using…
Marcos Sander
  • 1,971
  • 2
  • 13
  • 5
196
votes
6 answers

How to cd into a directory with this name "-2" (starting with the hyphen)?

I have a directory named: -2 I want to cd into it but the cd complains: bash: cd: -2: invalid option With no success, I've tried: cd "-2" cd '-2' cd \-2 Any solution? Edit: no file browsers like mc, etc. available on the server.
user151851
  • 1,863
  • 2
  • 12
  • 10
196
votes
22 answers

Is it normal to get hundreds of break-in attempts per day?

I just checked my server's /var/log/auth.log and found that I'm getting over 500 failed password/break-in attempt notifications per day! My site is small, and its URL is obscure. Is this normal? Should I be taking any measures?
Kyle Cureau
  • 1,537
  • 3
  • 11
  • 15
195
votes
14 answers

How to view all ssl certificates in a bundle?

I have a certificate bundle .crt file. doing openssl x509 -in bundle.crt -text -noout only shows the root certificate. how do i see all the other certificates?
pdeva
  • 2,447
  • 5
  • 18
  • 15
195
votes
5 answers

How to sleep in a batch file?

How to pause execution for a while in a Windows batch file between a command and the next one?
Massimo
  • 70,200
  • 57
  • 200
  • 323
195
votes
6 answers

LVM dangers and caveats

I have recently started using LVM on some servers for hard drives larger than 1 TB. They're useful, expandable and quite easy to install. However, I could not find any data about the dangers and caveats of LVM. What are the downsides of using LVM?
Adam Matan
  • 13,194
  • 19
  • 55
  • 75
195
votes
1 answer

What is a challenge password?

I'm setting up SSL on an Ubuntu server. One of fields it asks for as part of setting up the CSR is a "challenge password". What is that? The default is blank. Do I need to enter one?
Will Martin
  • 2,431
  • 5
  • 19
  • 18
195
votes
6 answers

VirtualBox: How to set up networking so both host and guest can access internet and talk to each other

I was wondering if someone could give me a simple guide on how to set up virtual networking in VirtualBox (4.0.2) so that the following scenarios work: Both Host and Guest can access the Internet Host can ping Guest and vice versa Host can access,…
Svish
  • 6,977
  • 15
  • 38
  • 45
193
votes
3 answers

What does a + mean at the end of the permissions from ls -l?

What is the plus sign at the end of the permissions telling me? ls -l total 4 drwxrwxrwx+ 2 benson avahi-autoipd 4096 Jan 27 17:37 docs Here's the context: cat /etc/issue \CentOS release 5.3 (Final) Kernel \r on an \m
bmargulies
  • 2,333
  • 3
  • 17
  • 20
193
votes
8 answers

How do you validate fstab without rebooting?

I modified /etc/fstab. I verified the new devices and I can mount them with the mount command. How may I validate the modifications made to /etc/fstab ?
Luc M
  • 3,110
  • 4
  • 26
  • 27
192
votes
15 answers

How to know from which yum repository a package has been installed?

After I have installed a package by yum (with multiple repositories configured), how can I find from which repository it has been installed? If I run yum info package-name (or yum list package-name), I can only see that the package is "installed".
lg.
  • 4,649
  • 3
  • 21
  • 20
192
votes
6 answers

how to disable SSH login with password for some users?

On Linux (Debian Squeeze) I would like to disable SSH login using password to some users (selected group or all users except root). But I do not want to disable login using certificate for them. edit: thanks a lot for detailed answer! For some…
Stepan
  • 2,139
  • 3
  • 15
  • 8
192
votes
11 answers

ssh-agent forwarding and sudo to another user

If I have a server A into which I can login with my ssh key and I have the ability to "sudo su - otheruser", I lose key forwarding, because the env variables are removed and the socket is only readable by my original user. Is there a way I can…
Florian Schulze
191
votes
10 answers

Nginx enable site command

We all know how to enable a website using apache on Linux. I'm pretty sure that we all agree on using the a2ensite command. Unfortunately, there is no default equivalent command that comes with Nginx, but it did happen that I installed some package…
HXH
  • 3,045
  • 2
  • 18
  • 13