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
269
votes
2 answers

Why is "chmod -R 777 /" destructive?

This is a Canonical Question about File Permission and Why 777 is "destructive". I'm not asking how to fix this problem, as there are a ton of references of that already on Server Fault (reinstall OS). Why does it do anything destructive at…
samwise
  • 2,393
  • 2
  • 14
  • 9
266
votes
5 answers

Why does my hostname appear with the address 127.0.1.1 rather than 127.0.0.1 in /etc/hosts?

This may be a bit of a noobish question, but I was taking a look at /etc/hosts on my new Xubuntu install and saw this: 127.0.0.1 localhost 127.0.1.1 myhostname On most 'nixes I've used, the second line is omitted, and if I want to add my hostname…
Tom
  • 3,213
  • 2
  • 20
  • 19
265
votes
2 answers

Linux command to inspect TXT records of a domain

Is there a linux shell command that I can use to inspect the TXT records of a domain?
John
  • 7,343
  • 23
  • 63
  • 87
262
votes
11 answers

How can I run Debian stable but install some packages from testing?

Say you're running a server and you don't want to upgrade to Testing (Squeeze) from Stable (Lenny) to just install a required package or two. What's the best way of installing only certain packages from Testing?
Gareth
  • 8,573
  • 13
  • 44
  • 44
251
votes
10 answers

When does `cron.daily` run?

When do entries in cron.daily (and .weekly and .hourly) run, and is it configurable? I haven't found a definitive answer to this, and am hoping there is one. I'm running RHEL5 and CentOS 4, but for other distros/platforms would be great, too.
warren
  • 18,369
  • 23
  • 84
  • 135
245
votes
13 answers

Environment variables of a running process on Unix?

I need to troubleshoot some problems related to environment variables on a Unix system. On Windows, I can use a tool such as ProcessExplorer to select particular a process and view values of each environment variable. How can I accomplish the same…
Gant
  • 2,595
  • 2
  • 16
  • 8
241
votes
10 answers

How to run a command multiple times, using bash shell?

Is there a way to run a command (e.g. ps aux|grep someprocess) for n times? Something like: run -n 10 'ps aux|grep someprocess' I want to use it interactively. Update: The reason I am asking this is, that I do work on a lot of machines and I don't…
mahatmanich
  • 2,954
  • 3
  • 22
  • 23
237
votes
16 answers

df in linux not showing correct free space after file removal

I have file servers which are used to store files. Files might reside there for a week, or for a year. Unfortunately, when I remove files from the server, df command doesn't reflect the freed up space. So eventually, the server gets filled up (df…
user11350
234
votes
4 answers

What's the best way of handling permissions for Apache 2's user www-data in /var/www?

Has anyone got a nice solution for handling files in /var/www? We're running Name Based Virtual Hosts and the Apache 2 user is www-data. We've got two regular users & root. So when messing with files in /var/www, rather than having to... chown -R…
Gareth
  • 8,573
  • 13
  • 44
  • 44
229
votes
19 answers

In my /etc/hosts/ file on Linux/OSX, how do I do a wildcard subdomain?

I need to test sub-domains on my localhost. How can I effectively have this result of adding *.localhost.com to my /etc/hosts/ file? If it's not possible, how do I work around this problem? I need to test wildcard sub-domains on my localserver. …
MikeN
  • 8,442
  • 5
  • 23
  • 18
228
votes
17 answers

Permission denied (publickey). SSH from local Ubuntu to Amazon EC2 server

I have an instance of an application running in the cloud on an Amazon EC2 instance, and I need to connect to it from my local Ubuntu. It works fine on one local ubuntu and also laptop. I got this message, Permission denied (publickey)., when trying…
Vorleak Chy
  • 2,421
  • 2
  • 15
  • 8
227
votes
3 answers

How do I do 'mount --bind' in /etc/fstab?

I'm trying to add mount --bind /proc/ /chroot/mysql/proc to /etc/fstab. How can I do this?
Some Linux Nerd
  • 3,327
  • 3
  • 19
  • 22
226
votes
8 answers

When does /tmp get cleared?

I'm taking to putting various files in /tmp, and I wondered about the rules on deleting them? I'm imagining it's different for different distributions, and I'm particularly interested in Ubuntu and Fedora desktop versions. But a nice general way of…
John Lawrence Aspden
  • 2,536
  • 4
  • 17
  • 12
225
votes
10 answers

How to check if a library is installed?

In Linux, how do I check if a library is installed or not? (from the command line of course). In my specific case now, I want to check whether libjpeg is installed.
hasen
  • 2,534
  • 2
  • 18
  • 12
222
votes
14 answers

Shell command to monitor changes in a file

I know there was a command on Unix that I could use to monitor a file and see changes that are getting written to it. This was quite useful especially for checking log files. Do you know what it is called?
Sebastian Hoitz
  • 3,169
  • 3
  • 24
  • 19