All Questions

Filter by
Sorted by
Tagged with
221 votes
10 answers
208k views

How to install tzdata on a ubuntu docker image?

I have the following line in the Dockerfile. RUN apt-get install -y tzdata When I run it, it asks for my input. After I provided my input, it hung there. Does anybody know how to solve this problem? ...
user1424739's user avatar
  • 2,369
221 votes
9 answers
1.0m views

How to check sshd log?

I have Ubuntu 9.10 installed with sshd and I can successfully connect to it using login and password. I have configured an RSA key login and now have "Server refused our key" as expected. Ok, now I ...
grigoryvp's user avatar
  • 3,815
220 votes
7 answers
459k views

Nginx config reload without downtime

I use nginx as a reverse proxy. Whenever I update the config for it using sudo "cp -r #{nginx_config_path}* /etc/nginx/sites-enabled/" sudo "kill -s HUP `cat /var/run/nginx.pid`" I face a brief ...
Saurav Shah's user avatar
  • 2,315
218 votes
5 answers
213k views

Difference in sites-available vs sites-enabled vs conf.d directories (Nginx)?

I have some experience using linux but none using nginx. I have been tasked with researching load-balancing options for an application server. I have used apt-get to install nginx and all seems ...
Seth Spearman's user avatar
218 votes
8 answers
357k views

Setting the hostname: FQDN or short name?

I've noticed that the "preferred" method of setting the system hostname is fundamentally different between Red Hat/CentOS and Debian/Ubuntu systems. CentOS documentation and the RHEL ...
Cakemox's user avatar
  • 25.6k
217 votes
16 answers
164k views

How do diff over ssh?

How do I diff files/folders across machines provided that the only connectivity available is ssh?
Alexey Timanovsky's user avatar
216 votes
11 answers
341k views

How to read backward from the end of file in less or more?

I've found one way so far: less +G filename, but it scrolls up line-by-line only with ↑. What's a more powerful less usage which provides scrolling by page, backward pattern search, and so on?
yetanothercoder's user avatar
215 votes
18 answers
387k views

How to use rsync over FTP

Any unix: I have the following cmd line which works fine. rsync -avr -e ssh /home/dir [email protected]:/home/ But I need to set it up now to rsync to a remote server that only has an FTP server on ...
bumperbox's user avatar
  • 2,353
215 votes
8 answers
351k views

How to setup passwordless `sudo` on Linux?

How can passwordless sudo access be setup on either RHEL (Fedora, CentOS, etc) or Ubuntu distributions? (If it's the same across distros, that's even better!) Setting: personal and/or lab/training ...
warren's user avatar
  • 18.7k
214 votes
10 answers
528k views

How to refresh hosts file without rebooting

On Windows, how do you refresh the hosts file without rebooting?
user avatar
213 votes
1 answer
222k views

SSH use only my password, Ignore my ssh key, don't prompt me for a passphrase

This is a question regarding the OpenSSH client on Linux, MacOSX and FreeBSD. Normally, I log into systems using my SSH key. Occasionally, I want my SSH client to ignore my SSH key and use a ...
Stefan Lasiewski's user avatar
212 votes
13 answers
580k views

hosts file ignored, how to troubleshoot?

The hosts file on Windows computers is used to bind certain name strings to specific IP addresses to override other name resolution methods. Often, one decides to change the hosts file, and discovers ...
Superbest's user avatar
  • 5,345
212 votes
6 answers
740k views

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 ...
Svish's user avatar
  • 7,257
211 votes
8 answers
218k views

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's user avatar
  • 3,310
208 votes
15 answers
372k views

How to reconnect to a disconnected ssh session

Is there a way to connect to an ssh session that was disconnected? We are having problems with our network connection to a remote site that we are working on separately; however, in the mean time we ...
palehorse's user avatar
  • 4,369
207 votes
9 answers
250k views

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 ...
Marcos Sander's user avatar
207 votes
3 answers
117k views

Possible to change email address in keypair?

I've created an RSA keypair that I used for SSH, and it includes my email address. (At the end of the public key.) I've now changed my email address. Is it possible to change the email address on ...
Ram Rachum's user avatar
  • 5,301
206 votes
3 answers
181k views

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 ...
Abhishek Gupta's user avatar
206 votes
6 answers
822k views

How do I convert a .cer certificate to .pem?

I have a .cer certificate and I would like to convert it to the .pem format. If I remember correctly, I used to be able to convert them by exporting the .cer in Base64, then renaming the file to .pem ...
systempuntoout's user avatar
206 votes
4 answers
283k views

Meaning of the buffers/cache line in the output of free

Why does my server show total used free shared buffers cached Mem: 12286456 11715372 571084 0 81912 6545228 -/+ buffers/cache: 5088232 7198224 Swap:...
Muahmmad Zeeshan's user avatar
205 votes
5 answers
155k views

What is a glue record?

This is a Canonical Question about DNS glue records. What exactly (but briefly) is a DNS glue record? Why are they needed and how do they work?
LanceBaynes's user avatar
  • 3,127
204 votes
3 answers
179k views

How do I ask apt-get to skip any interactive post-install configuration steps?

I have a server build script which uses apt-get to install packages. It then puts pre-written configuration files directly in place, so the interactive post-install configuration dialog in packages ...
jl6's user avatar
  • 2,635
204 votes
9 answers
569k views

How to start/stop/restart launchd services from the command line?

How do I restart, say for example my httpd or afpd, running any Mac OS X >= 10.5 (Leopard-), without having to use the GUI and go to System Preferences -> Sharing and unchecking/checking "Web Sharing"?...
conny's user avatar
  • 2,429
204 votes
9 answers
33k views

Heartbleed: What is it and what are options to mitigate it?

This is a Canonical Question about understanding and remediating the Heartbleed security issue. What exactly is CVE-2014-0160 AKA "Heartbleed"? What is the cause, what OSs and versions of OpenSSL are ...
Jacob's user avatar
  • 9,242
203 votes
6 answers
190k views

Non interactive git clone (ssh fingerprint prompt) [duplicate]

I want to clone a repo in a non-interactive way. When cloning, git asks to confirm host's fingerprint: The authenticity of host 'bitbucket.org (207.223.240.182)' can't be established. RSA key ...
qwe's user avatar
  • 2,077
202 votes
14 answers
258k views

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's user avatar
  • 2,517
202 votes
1 answer
211k views

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's user avatar
  • 2,513
200 votes
5 answers
629k views

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's user avatar
  • 71.3k
200 votes
3 answers
203k views

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)...
bmargulies's user avatar
  • 2,403
198 votes
11 answers
110k views

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 ...
user avatar
196 votes
6 answers
65k views

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 ...
user151851's user avatar
  • 1,863
196 votes
22 answers
111k views

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? ...
Kyle Cureau's user avatar
  • 1,537
196 votes
6 answers
85k views

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 ...
Adam Matan's user avatar
  • 13.6k
195 votes
10 answers
507k views

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, ...
HXH's user avatar
  • 3,105
194 votes
13 answers
212k views

Top level domain/domain suffix for private network?

At our office, we have a local area network with a purely internal DNS setup, on which clients all named as whatever.lan. I also have a VMware environment, and on the virtual-machine-only network, I ...
Otto's user avatar
  • 2,171
194 votes
6 answers
213k views

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:...
Stepan's user avatar
  • 2,159
194 votes
15 answers
358k views

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), ...
lg.'s user avatar
  • 4,679
192 votes
10 answers
663k views

How do I verify the speed of my NIC?

I just installed a new gigabit network interface card (NIC) in Linux. How do I tell if it is really set to gigabit speeds? I see ethtool has an option to set the speed, but I can't seem to figure ...
User1's user avatar
  • 2,556
191 votes
10 answers
319k views

What is "-bash: !": event not found"

Try executing the following under a bash shell echo "Reboot your instance!" On my installation: root@domU-12-31-39-04-11-83:/usr/local/bin# bash --version GNU bash, version 4.1.5(1)-release (i686-pc-...
Maxim Veksler's user avatar
191 votes
5 answers
457k views

DNS - NSLOOKUP what is the meaning of the non-authoritative answer?

For some domains nslookup gives me a Non-authoritative answer section. What does this mean? Got answer: HEADER: opcode = QUERY, id = 3, rcode = NXDOMAIN header flags: response, ...
mahen3d's user avatar
  • 4,432
191 votes
5 answers
27k views

I am under DDoS. What can I do?

This is a Canonical Question about DoS and DDoS mitigation. I found a massive traffic spike on a website that I host today; I am getting thousands of connections a second and I see I'm using all ...
Falcon Momot's user avatar
  • 25.3k
190 votes
9 answers
1.2m views

Resolve host name from IP address

I'm looking for a command line tool which gets an IP address and returns the host name, for Windows.
DouglasJose's user avatar
  • 2,023
190 votes
6 answers
499k views

SSL Certificate Location on UNIX/Linux

Is there any standard or convention for where SSL certificates and associated private keys should go on the UNIX/Linux filesystem?
John Topley's user avatar
  • 2,205
190 votes
2 answers
48k views

What are the different widely used RAID levels and when should I consider them?

This is a Canonical Question about RAID levels. What are: the RAID levels typically used (including the RAID-Z family)? deployments are they commonly found in? benefits and pitfalls of each?
MDMarra's user avatar
  • 101k
190 votes
4 answers
83k views

Should I quit using Ifconfig?

With the servers that mount Infiniband cards, when I use the ifconfig command, I get this warning: Ifconfig uses the ioctl access method to get the full address information, which limits hardware ...
Zhen's user avatar
  • 2,159
189 votes
12 answers
16k views

Physically locating the server

I've got a CentOS server somewhere in the building; I can login into it remotely and VNC, etc. Now I've got to physically move it, and for that I need to physically locate the machine among the ...
Michael's user avatar
  • 1,723
187 votes
13 answers
44k views

Why couldn't MAC addresses be used instead of IPv4|6 for networking? [closed]

I am reading up on TCP/IP and other related protocols and technologies. MAC addresses are described as being (reasonably :) unique, and as having a large possibility space (several hundred trillions), ...
Félix Saparelli's user avatar
187 votes
73 answers
247k views

What tool do you use to monitor your servers?

For a more comprehensive list of monitoring tools and their features, check out this Wikipedia page. As the question states, what are the most commonly used tools used for this task and what are ...
186 votes
6 answers
1.3m views

What port does SFTP use?

Does SFTP use port 21 or port 22?
Daniel's user avatar
  • 3,801
185 votes
14 answers
306k views

How to create a UUID in bash?

In Java it is possible to create a random UUID: UUID uuid = UUID.randomUUID(); How to do this in Bash?
raoulsson's user avatar
  • 4,823

15 30 50 per page