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
3 answers

Cannot Set UID on Shell Scripts

Can anyone help me find out what is going on here? I have some rules set up tracking packet counts. When I run the following script as root: #!/bin/bash iptables -t mangle -xnvL I get the output I expect: //snip 233203 199929802 MARK //blah blah…
Tom Ritter
  • 3,197
  • 5
  • 27
  • 30
15
votes
1 answer

Potential hijacked SSH session & SSH best practices

I'm freaking out a little bit at the moment. I am SSHing into a remote server that I have recently commissioned. I'm doing this as root. I have installed fail2ban and had a massive amount of banned IPs in the log. The last time I logged in i…
MarMan29
  • 343
  • 3
  • 7
15
votes
2 answers

sudo not working on certain commands

I have a rather weird problem with sudo on Debian 8. Users cannot execute some of commands in /etc/sudoers.d. I use Chef to distribute configurations, so all files are automatically generated. Example: This config works fine root@server:~# cat…
Lain Iwakura
  • 163
  • 1
  • 1
  • 5
15
votes
1 answer

Disabling rp_filter on one interface

I have an Ubuntu 16.04 Server which is acting as a router with multiple (VLAN) interfaces. By default, rp_filter (reverse path filtering) is enabled for all interfaces. I want to keep it that way, but make an exception for exactly one interface.…
Cybran
  • 422
  • 2
  • 6
  • 16
15
votes
6 answers

is ksplice production ready?

I would be interested to hear the serverfault community's experiences with Ksplice in production. Quick blurb from wikipedia: Ksplice is a free and open source extension of the Linux kernel which allows system administrators to apply security…
faultyserver
  • 1,914
  • 1
  • 16
  • 20
15
votes
8 answers

What are main steps doing forensic analysis of linux box after it was hacked?

What are main steps doing forensic analysis of linux box after it was hacked? Lets say it is a generic linux server mail/web/database/ftp/ssh/samba. And it started sending spam, scanning other systems.. How to start searching for ways hack was done…
Kazimieras Aliulis
  • 2,324
  • 2
  • 26
  • 46
15
votes
2 answers

Restarting networking on Debian Jessie

I would like to know which is the right method to restart networking service in Debian Jessie. I know that I can use: service networking restart or /etc/init.d/networking restart that anyway gave me problems on ssh connection, or invoke-rc.d…
cloud81
  • 163
  • 1
  • 2
  • 8
15
votes
5 answers

WGET can't resolve host

I've got 2 machines on the same sub-net running Debian 5.0. They use the same DNS (/etc/resolv.conf), they route to the same gateway (#route) and they have the same iptables settings (#iptables -L). I can ping from both of them, both to IP…
Maggi Trymbill
15
votes
4 answers

Command line recursive/deep directory copy in Linux?

What is a good, general way to make a recursive/deep directory copy in Linux that works in most cases? I've used simple things like cp -R as well as fairly elaborate cpio incantations. Are there any significant strengths or weaknesses that cause you…
Greg Mattes
  • 324
  • 1
  • 4
  • 11
15
votes
6 answers

"No space left on device", df shows discrepancy

A few hours ago my root partition filled up, I moved files away from it and df reports: # df -h Filesystem Size Used Avail Use% Mounted on /dev/hda1 183G 174G 0 100% / So there should be 9GB free, but avail reports 0…
mark
  • 1,516
  • 5
  • 21
  • 33
15
votes
1 answer

Count number of allowed CPUs in a Docker container

My specific scenario is the following. I launch a docker container with a specific cpuset: docker run --cpuset-cpus="0-2" # ... inside that container I run a shell script as the entry point and that shell script will run make at some point. I would…
pmr
  • 425
  • 1
  • 4
  • 9
15
votes
1 answer

Why must the IP be configured on the bridge device?

My understanding of a network bridge is having a kind of "virtual switch" which virtually connects the network devices (that were added to the bridge) as if I would connect them to a real switch with cables... but something must be wrong with that…
SDwarfs
  • 385
  • 4
  • 18
15
votes
2 answers

How do I mount sub-directory to a hard drive in Linux?

Let us assume that I have two hard drives (A,B) and have the following directories: /var/www /var/www/upload Currently if I upload a file to /var/www OR /var/www/upload ; it will be saved in drive A. How do I make the folder /var/www/upload point…
-provideralbarak
15
votes
2 answers

Where did my RAM go?

Note: before you jump in too fast, yes I read linuxatemyram.com! I have a server with 64GB RAM. free -m says that my RAM is full, and it's not because of disk caching: total used free shared buffers cached Mem: …
BenMorel
  • 4,507
  • 10
  • 57
  • 85
15
votes
3 answers

What is the best way to measure latency via a "telnet to port" test, preferably with built-in Linux tools?

I'm writing a Graphite/Diamond collector measuring network latency. Specifically it should measure the time it takes to open up a connection to a port on a remote server. And it needs to work via script, i.e. no humans on the keyboard running this…
r3cgm
  • 197
  • 1
  • 1
  • 7