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
60
votes
1 answer

What is the difference between a 'Login' and an 'Interactive' bash shell

What is the difference between a ‘Login’ and an ‘Interactive’ bash shell? I have quoted Wikipedia below but can anybody give a better answer? EDIT: This is a community wiki so maybe rather than voting to close you could provide examples of which…
Gareth
  • 8,573
  • 13
  • 44
  • 44
60
votes
6 answers

"reboot" or "shutdown -r now": what restart command is safer?

We have in our organization around ~500 RedHat Linux machines. On all the machines we installed applications and services under /etc/init.d, and oracle RAC servers. We intend to perform yum updates on all machines and after that take a reboot. So I…
dandan
  • 1,081
  • 4
  • 13
  • 21
60
votes
5 answers

How to understand the memory usage and load average in linux server

I am using a linux server which has 128GB of memory and 24 cores. I use top to see how much it is used. Its output is pasted at the end of the post. Here are two questions: (1) I see that each of the running processes occupies a very small…
Tim
  • 1,487
  • 6
  • 28
  • 43
60
votes
7 answers

adding password to .ssh/config

I'm using ubuntu 12.04. I'm using ssh for connecting to many servers daily, so I put their parameters in .ssh/config file; like this : Host server1 User tux Port 2202 HostName xxx.x.xx.x I know we should use key-pair ensure security, however…
Ajo Augustine
  • 1,262
  • 4
  • 16
  • 21
60
votes
2 answers

Where are the logs for ufw located on Ubuntu Server?

I have an Ubuntu server where I am blocking some IPs with ufw. I enabled logging, but I don't know where to find the logs. Where might the logs be or why might ufw not be logging?
blockhead
  • 861
  • 1
  • 8
  • 13
60
votes
18 answers

Favorite rsync tips and tricks

The more I use rsync the more I realise that it's a swiss army knife of file transfer. There are so many options. I recently found out that you can go --remove-source-files and it'll delete a file from the source when it's been copied, which makes…
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
60
votes
7 answers

How do I know I'm running inside a linux "screen" or not?

The "screen" refers to a program mentioned in How to reconnect to a disconnected ssh session . That is a good facility. But there is a question I'd really like to know. How do I know whether I'm running inside a "screen"? The difference is: If…
Jimm Chen
  • 1,749
  • 5
  • 18
  • 32
60
votes
5 answers

iptables port redirect not working for localhost

I want to redirect all traffic from port 443 to the internal port 8080. I'm using this config for iptables: iptables -t nat -I PREROUTING --source 0/0 --destination 0/0 -p tcp \ --dport 443 -j REDIRECT --to-ports 8080 This works for all…
Chris
  • 601
  • 1
  • 6
  • 3
60
votes
6 answers

shutdown: What is difference between "Power Off" and "Halt"?

With your typical Linux shutdown command, what is the difference between halting the system and powering off the system?
Jake Wilson
  • 8,814
  • 29
  • 97
  • 125
60
votes
3 answers

What is the difference between a soft (symbolic) link and a hard link?

I hear that you can now create soft links in Vista too. So, what is the difference between a soft (symbolic) link and a hard link on UNIX/Linux/Vista? Are there advantages of using one over the other? Or do they just serve two distinct purposes?
Aaron K
  • 1,525
  • 5
  • 18
  • 16
59
votes
3 answers

iptables -L pretty slow. Is this normal?

Quick question but Gooling has not revealed an answer. When I do iptables -L, it seems to lag on displaying items in where I have limited the source to internal ips 192.168.0.0/24 The whole listing takes about 30 seconds to display. I just want to…
Bartek
  • 799
  • 2
  • 8
  • 12
59
votes
3 answers

Docker: failed to add the pair interfaces (operation not supported)

After installing Docker, I am getting an error when I try to run the Hello World example: Error response from daemon: Cannot start container 4145d0fccd96b904e4ab4413735f1129b8765429bad5be71dc8d5f4c0760666d: failed to create endpoint high_saha on…
piero-la-lune
  • 593
  • 1
  • 4
  • 4
59
votes
10 answers

how to use xauth to run graphical application via other user on linux

My regular user account is, let's say, user1. I created separate user2 for some x application that i would like to run while being logged into x as user1 but in a way that will prevent it from read/write access to user1 data. I thought that i could…
Phil
  • 1,969
  • 6
  • 29
  • 33
59
votes
8 answers

Run a shell script as a different user

What's a good way of running a shell script as a different user. I'm using Debian etch, and I know which user I want to impersonate. If I was doing it manually, I would do: su postgres ./backup_db.sh /tmp/test exit Since I want to automate the…
Wadih M.
  • 1,032
  • 1
  • 10
  • 18
59
votes
7 answers

dd on entire disk, but do not want empty portion

I have a disk, say /dev/sda. Here is fdisk -l: Disk /dev/sda: 64.0 GB, 64023257088 bytes 255 heads, 63 sectors/track, 7783 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size…
Jonathan Henson
  • 979
  • 2
  • 10
  • 16