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
104
votes
8 answers

What limits the maximum number of connections on a Linux server?

What kernel parameter or other settings control the maximum number of TCP sockets that can be open on a Linux server? What are the tradeoffs of allowing more connections? I noticed while load testing an Apache server with ab that it's pretty easy to…
Ben Williams
  • 2,376
  • 4
  • 21
  • 17
103
votes
6 answers

Tips for Securing a LAMP Server

This is a Canonical Question about Securing a LAMP stack What are the absolute guidelines for securing a LAMP server?
Aditya Shukla
  • 1,031
  • 3
  • 8
  • 3
102
votes
8 answers

Can you have more than one ~/.ssh/config file?

We have a bastion server that we use to connect to multiple hosts, and our .ssh/config has grown to over a thousand lines (we have hundreds of hosts that we connect to). This is beginning to get a little unwieldy and I'd like to know if there is a…
wrangler
  • 3,080
  • 5
  • 24
  • 20
102
votes
6 answers

How to force nginx to resolve DNS (of a dynamic hostname) everytime when doing proxy_pass?

I am using nginx/0.7.68, running on CentOS, with the following configuration: server { listen 80; server_name ***; index index.html index.htm index.php default.html default.htm default.php; location / { root …
xiamx
  • 1,212
  • 2
  • 9
  • 10
102
votes
11 answers

How to prevent a user from login in, but allow "su - user" in Linux?

How do you allow a user to log in using "su - user" but prevent the user from login in using SSH? I tried to set the shell to /bin/false but the when I try to su it doesn't work. Are there several ways to only allow logins by su? Is SSH's AllowUser…
NoozNooz42
  • 1,185
  • 2
  • 9
  • 9
101
votes
9 answers

How to add a security group to a running EC2 Instance?

I have an Amazon EC2 instance running and I will like to add another security group to that instance and then remove the current security group from that instance. Is this possible?
Geo
  • 3,071
  • 11
  • 42
  • 52
101
votes
2 answers

I have a keypair. How do I determine the key length?

Using OpenSSL from the command line in Linux, is there some way to examine a key (either public or private) to determine the key size?
jdw
  • 3,855
  • 2
  • 17
  • 21
101
votes
3 answers

Perform rsync while following sym links

I have a directory that contains symbolic links to other directories located on different media on my system: /opt/lun1/2011 /opt/lun1/2010 /opt/lun2/2009 /opt/lun2/2008 /opt/lun3/2007 But the symbolic links show up…
ensnare
  • 2,212
  • 7
  • 24
  • 40
100
votes
4 answers

Is there a directory equivalent of /dev/null in Linux?

When configuring an application, you can often use /dev/null as config file if you want the application to read an empty file. But, if the application reads a list of files from a directory, you cannot use this trick. You would need to give it an…
roelvanmeer
  • 1,764
  • 3
  • 13
  • 27
100
votes
3 answers

How to get the url of the current svn repo?

I have 2 svn checkouts that someone setup for me. Now I need to check these same files on another computer, but since I didn't check them out initially I don't know the urls to use when running the svn checkout command: svn co WHAT_GOES_HERE? Since…
Manny
  • 1,003
  • 2
  • 7
  • 4
100
votes
7 answers

Is there a way to do a remote "ls" much like "scp" does a remote copy?

Is there a way to do a remote "ls" much like "scp" does a remote copy in a standard linux shell?
yazz.com
  • 7,193
  • 15
  • 38
  • 39
99
votes
3 answers

Should I install Linux applications in /var or /opt?

I run a lot of open source applications including java and tomcat. It seems like most instructions have my applications running from the /var directory. But every once in a while, I also see the /opt directory. While I'm at it, I also see…
Trevor Allred
  • 1,137
  • 1
  • 8
  • 7
99
votes
11 answers

How can I export the privileges from MySQL and then import to a new server?

I know how to export/import the databases using mysqldump & that's fine but how do I get the privileges into the new server. For extra points, there are a couple of existing databases on the new one already, how do I import the old servers…
Gareth
  • 8,573
  • 13
  • 44
  • 44
98
votes
6 answers

SSHFS mount that survives disconnect

I'm using SSHFS mounts from my laptop to a central server. Obviously, the SSHFS mount is broken after a longer disconnect (eg. during suspend), cause the underlying SSH connection timed out. Is there a way to get SSHFS mounts surviving long lasting…
bene
  • 2,294
  • 2
  • 19
  • 14
98
votes
7 answers

SSH from A through B to C, using private key on B

I'm looking for a simple way to SSH from my local machine, A, through a proxy, B, to a destination host, C. The private key that goes with the public key on C is on B, and I can't put that key on my local machine. Any tips? Also, I'd like to be…
wrangler
  • 3,080
  • 5
  • 24
  • 20