Questions tagged [linux]

Linux is the generic term for a UNIX-like open source operating system based on the Linux kernel.

GNU/Linux is a UNIX-like Open Source operating system. Linus Torvalds originally wrote the Linux kernel with contributions from others on the MINIX usenet board. Since then, Linux had thousands of developers, both paid by companies and volunteers. The main system tools and libraries for GNU/Linux are sourced from the GNU Project, hence the nomenclature GNU/Linux (GNU Toolchain over Linux Kernel). The Linux kernel is licensed under the GPL v2 license.

There are many different Linux Distributions (sometimes shortened to distro), which consist of software applications packaged and provided with the Linux kernel, being Slackware the oldest active distro and Debian, Red Hat and CentOS among the most used on Internet servers¹.

The Linux kernel is commonly run on servers but is highly portable and is used in a variety of applications, from wireless routers and cell phones to clusters and super computers with thousands of nodes and processors.

External Resources:

38271 questions
217
votes
8 answers

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 deployment guide say the hostname should be the…
Cakemox
  • 25,209
  • 6
  • 44
  • 67
207
votes
8 answers

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 equipment with no concern for unauthorized access…
warren
  • 18,369
  • 23
  • 84
  • 135
205
votes
5 answers

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 fine. I have a couple of questions. What is the…
Seth Spearman
  • 2,211
  • 2
  • 14
  • 10
204
votes
15 answers

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 experience a large number of disconnects due to…
palehorse
  • 4,299
  • 5
  • 29
  • 27
202
votes
4 answers

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: 24571408 54528 24516880 I have no idea on…
Muahmmad Zeeshan
  • 2,123
  • 4
  • 15
  • 13
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
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
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
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
190
votes
4 answers

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 addresses to 8 bytes. Because Infiniband address has…
Zhen
  • 2,159
  • 4
  • 19
  • 31
188
votes
6 answers

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
  • 2,175
  • 3
  • 16
  • 17
185
votes
10 answers

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 out how to report its current speed.
User1
  • 2,486
  • 5
  • 20
  • 21
183
votes
10 answers

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-linux-gnu) Copyright (C) 2009 Free Software…
Maxim Veksler
  • 2,725
  • 10
  • 28
  • 32