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

Logrotate does not remove old logs

for some reason the old log files are not deleted. Example with apache What the conf file says: $ cat /etc/logrotate.d/apache2 /var/log/apache2/*.log { weekly missingok rotate 2 compress delaycompress notifempty create…
SamK
  • 1,356
  • 3
  • 14
  • 28
15
votes
6 answers

Linux Centos with dmesg timestamp

I would like to read my Centos 5.x dmesg with timestamp, how do I do this?
edotan
  • 1,876
  • 13
  • 39
  • 57
15
votes
2 answers

Getting login year data with the 'last' command on linux

On Solaris, there the command 'fwtmp' provide the year information from the wtmp logs. For example: host # /usr/lib/acct/fwtmp < /var/adm/wtmpx > tmp_wtmpx_file host # head -1 tmp_wtmpx_file user123 sshd 1258 7 0000 0000 1226072918 230489 0 29…
Andrew Case
  • 3,489
  • 3
  • 23
  • 39
15
votes
1 answer

Limit which processes a user can restart with supervisor?

I have used supervisor to manage a Gunicorn process running a Django site, though this question could pertain to anything being managed by supervisor. Previously I was the only person managing and using our server, and supervisor just ran as root…
davidscolgan
  • 395
  • 2
  • 12
15
votes
6 answers

What's a proper way of checking if a PID is running?

I have a .pid file, and I need to check if the process is running. So far I found two options kill -0 `cat something.pid` which prints out an error if the pid isn't running. I know this can be redirected to /dev/null, but it makes me think that…
Jakub Arnold
  • 1,744
  • 10
  • 26
  • 33
15
votes
5 answers

FTP doesn't allow /usr/sbin/nologin user

I want to setup a ftp for couple of ftp-only users with vsftpd. I configured the FTP to enable local user access. It works fine. But once I edit the users' shell to /usr/sbin/nologin, it couldn't log into the FTP with the following error: Response: …
steveyang
  • 673
  • 4
  • 10
  • 16
15
votes
2 answers

Can I override my umask using ACLs to make all files created in a given directory world readable?

Assume that my umask is 0077. I have a directory, foo, that I want to have special permissions applied to it. All files I create in foo should be world readable, and all directories should be world readable and executable. Currently, if I create a…
stickmangumby
  • 526
  • 2
  • 5
  • 11
15
votes
7 answers

mkfs fails complaining that: "/dev/sdb is apparently in use by the system; will not make a filesystem here"

This is Ubuntu server 11.10. /dev/sdb is not mounted (see outputs below) and is not used by any process that I can see. Its not used for swap as well. This is a 2nd IDE drive in the server, connected to the secondary IDE and set up in hardware raid…
Harel
  • 630
  • 2
  • 7
  • 18
15
votes
14 answers

What backup solution you use for linux servers

What backup solutions you use for linux server in production environment? Do you prefer open source or commercial products? What you consider to be essential features in backup software? Which products you do not recommend? Are there any common…
Juha Syrjälä
  • 1,081
  • 10
  • 19
15
votes
2 answers

how do i perform root actions from non-root account?

I want to be able to restart services from a php-script. running under the www-user account. What's the preferred way to perform these actions? I recon I can place create a file with que'd commands, read by CRON, but the solution itches. What I'm…
user65297
  • 335
  • 1
  • 12
15
votes
7 answers

Can you explain this to me #ln -s :"target is not a directory"?

I'm doing this: sudo ln –s /etc/apache2/sites-available/LoginProject /etc/apache2/sites-enabled/LoginProject And I get: ln: target `/etc/apache2/sites-enabled/LoginProject' is not a directory /etc/apache2/sites-available/LoginProject it's a…
fceruti
  • 225
  • 1
  • 4
  • 12
15
votes
2 answers

Hosting Folder in the home directory using nginx

I would like to add a condition in an adduser script to update nginx.conf for it to load ~/www as http://ipaddress/~user whenever I create a new user. And when a user is named www.domainname it will host that domain name in the ~/www folder. Is…
Joseph Le Brech
  • 267
  • 1
  • 2
  • 6
15
votes
5 answers

Linux hard drive serial number as non-root

First of all, I would like to apologies for the title for not including hardware details. This is because I am looking for a command that will work in all Linux distribution. Question: I am very new to Linux and don't know much, however, is it…
mustafa
  • 151
  • 1
  • 1
  • 3
15
votes
4 answers

How to read the "IDLE" column in the output of the Linux 'w' command?

I'm trying to figure out a process that monitors users sessions on a remote server and alerts them when they are being idle too long, which with the Linux command w is aptly appropriate. Problem is - w uses 3 different formats to specify the idle…
Guss
  • 2,670
  • 5
  • 34
  • 59
15
votes
1 answer

Any logs of if/when "at" jobs were executed?

I've setup a couple of "at" jobs to execute at specific times on CentOS 5. This morning I don't see these commands in the queue ("atq"), as expected, but I also don't see were can I check whether the daemon responsible to execute them did this on…
Capt. Crunch
  • 839
  • 2
  • 12
  • 25