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:

37448 questions
1347
votes
39 answers

How can I sort du -h output by size

I need to get a list of human readable du output. However, du does not have a "sort by size" option, and piping to sort doesn't work with the human readable flag. For example, running: du | sort -n -r Outputs a sorted disk usage by size…
Tom Feiner
  • 16,758
  • 8
  • 29
  • 24
752
votes
9 answers

Can scp copy directories recursively?

Currently I can only copy a single .tar file. But how can I copy directories recursively with scp?
kernel
  • 8,211
  • 5
  • 18
  • 14
557
votes
3 answers

What exactly do the colors in htop status bars mean?

By default, htop shows colored status bars for processors, memory, and swap. From left to right, the bars are colored green, blue, yellow, and red depending on some thresholds. What does it mean when the Memory bar has a small level of green and…
tobym
  • 6,011
  • 3
  • 16
  • 9
390
votes
20 answers

How to run a server on port 80 as a normal user on Linux?

I have Googled about a solution for quite some time, but couldn't find an answer. I am on Ubuntu Linux and want to run a server on port 80, but due to security mechanism of Ubuntu, I get the following error: java.net.BindException: Permission…
Deepak Mittal
  • 4,053
  • 3
  • 16
  • 7
363
votes
5 answers

Anyone else experiencing high rates of Linux server crashes during a leap second day?

*NOTE: if your server still has issues due to confused kernels, and you can't reboot - the simplest solution proposed with gnu date installed on your system is: date -s now. This will reset the kernel's internal "time_was_set" variable and fix the…
Bron Gondwana
  • 1,738
  • 3
  • 12
  • 15
362
votes
7 answers

Why is my crontab not working, and how can I troubleshoot it?

This is a Canonical Question about using cron & crontab. You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you…
Eric Leschinski
  • 4,031
  • 4
  • 20
  • 27
359
votes
6 answers

What permissions should my website files/folders have on a Linux webserver?

This is a Canonical Question about File Permissions on a Linux web server. I have a Linux web server running Apache2 that hosts several websites. Each website has its own folder in…
Nic
  • 13,025
  • 16
  • 59
  • 102
352
votes
19 answers

Showing total progress in rsync: is it possible?

I have searched for this option already, but have only found solutions that involve custom patching. The fact that it does not show in --help and no more info can be found probably indicates the answers is 'no', but I'd like to see this…
Aron Rotteveel
  • 8,239
  • 17
  • 51
  • 64
328
votes
18 answers

Copying a large directory tree locally? cp or rsync?

I have to copy a large directory tree, about 1.8 TB. It's all local. Out of habit I'd use rsync, however I wonder if there's much point, and if I should rather use cp. I'm worried about permissions and uid/gid, since they have to be preserved in the…
Amandasaurus
  • 30,211
  • 62
  • 184
  • 246
326
votes
4 answers

What are the functional differences between .profile .bash_profile and .bashrc

What are the functional differences between the .profile, .bash_profile and .bashrc files?
lollercoaster
  • 3,425
  • 5
  • 17
  • 10
319
votes
24 answers

Can I automatically add a new host to known_hosts?

Here's my situation: I'm setting up a test harness that will, from a central client, launch a number of virtual machine instances and then execute commands on them via ssh. The virtual machines will have previously unused hostnames and IP…
gareth_bowles
  • 8,867
  • 9
  • 33
  • 42
305
votes
8 answers

How to bind MySQL server to more than one IP address?

Is there a secret way to bind MySQL to more than one IP address? As far as I can see the bind-address parameter in the my.cnf does not support more than one IP and you can't have it more than once.
BlaM
  • 3,816
  • 5
  • 26
  • 27
281
votes
13 answers

Can I nohup/screen an already-started process?

I'm doing some test-runs of long-running data migration scripts, over SSH. Let's say I start running a script around 4 PM; now, 6 PM rolls around, and I'm cursing myself for not doing this all in screen. Is there any way to "retroactively" nohup a…
ojrac
  • 2,913
  • 3
  • 17
  • 5
278
votes
7 answers

Check if port is open or closed on a Linux server?

How can I check if a port is listening on a Linux server?
James Anderson
  • 2,947
  • 2
  • 16
  • 12
268
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,383
  • 2
  • 14
  • 9
1
2 3
99 100