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
114
votes
8 answers

How to run command as user who has /usr/sbin/nologin as Shell?

All I need to do is to run a specific script as a particular user who does have the nologin/false shell indicated in /etc/passwd. I would run the script as root and this should run as another user. Running: ~# su -c "/bin/touch /tmp/test"…
Tommaso
  • 1,161
  • 2
  • 8
  • 4
114
votes
2 answers

How to re-order windows, change the scroll shortcut, and modify the status bar contents in GNU Screen?

I learned to use gnu-screen and have been using it for the past several weeks. I got a grip of the basics now, and would be very helpful if I get these queries clarified: How do I rename / reorder / move windows in Linux screen utility? For eg.,…
Rangzy
  • 1,241
  • 2
  • 9
  • 5
113
votes
5 answers

What is this IP address: 169.254.169.254?

I have always noticed an IP something "169.254.x.x" in my routing table even when I am not connected to any network in my Windows operating system. In Linux, when I list my routing table. $ ip route show I get an entry like 169.254.0.0/16 dev eth0…
pradeepchhetri
  • 2,698
  • 6
  • 37
  • 47
112
votes
85 answers

Linux command line best practices and tips?

I would like to open a discussion that would accumulate your Linux command line (CLI) best practices and tips. I've searched for such a discussion to share the below comment but haven't found one, hence this post. I hope we all could learn from…
Maxim Veksler
  • 2,725
  • 10
  • 28
  • 32
110
votes
8 answers

Is it possible to alias a hostname in Linux?

Is it possible to alias a hostname in Linux? It has been asked by jmillikin at various Ubuntu forums as follows: Is it possible to create a hostname alias? Sort of like /etc/hosts, but with other hostnames rather than IP addresses. So that with…
user10178
110
votes
8 answers

How to install/change locale on Debian?

I've written a web application for which the user interface is in Dutch. I use the system's date and time routines to format date strings in the application. However, the date strings that the system formats are in English but I want them in Dutch,…
Hongli Lai
  • 2,222
  • 4
  • 23
  • 27
110
votes
9 answers

Allow SFTP but disallow SSH?

I'm starting a very little hosting company for a few friends and little clients, nothing big. I want to give my "clients" the right to manage their files on the server. I hate FTP as it is not secure and it's in my opinion obsolete. So I'd like to…
Tommy B.
  • 1,413
  • 2
  • 14
  • 14
109
votes
10 answers

How to display certain lines from a text file in Linux?

I guess everyone knows the useful Linux cmd line utilities head and tail. head allows you to print the first X lines of a file, tail does the same but prints the end of the file. What is a good command to print the middle of a file? something like…
Boaz
  • 2,229
  • 5
  • 20
  • 15
108
votes
4 answers

How to make Windows 7 USB flash install media from Linux?

I have: ISO image of Windows 7 install media 4 GB USB flash drive no DVD drive Linux installed
Ian Kelling
  • 2,661
  • 6
  • 23
  • 21
108
votes
8 answers

Can I send some text to the STDIN of an active process running in a screen session?

I have a long-running server process inside a screen session on my Linux server. It's a bit unstable (and sadly not my software so I can't fix that!), so I want to script a nightly restart of the process to help stability. The only way to make it do…
Richard Gaywood
107
votes
2 answers

How to do the port forwarding from one ip to another ip in same network?

I would like do some NAT in iptables. So that, all the packets coming to 192.168.12.87 and port 80 will be forwarded to 192.168.12.77 port 80. How to do this with iptables? Or Any other ways to achieve the same?
sat
  • 1,273
  • 4
  • 13
  • 14
107
votes
3 answers

Does getting disconnected from an SSH session kill your programs?

So, say I get disconnected from an SSH-session after I've started rsync or cp or any other command that can be long running. Does that command keep running until it's finished after I get disconnected or does it just get killed? Always wondered…
fregas
  • 1,221
  • 2
  • 9
  • 8
107
votes
6 answers

"POSSIBLE BREAK-IN ATTEMPT!" in /var/log/secure — what does this mean?

I've got a CentOS 5.x box running on a VPS platform. My VPS host misinterpreted a support inquiry I had about connectivity and effectively flushed some iptables rules. This resulted in ssh listening on the standard port and acknowledging port…
Mike B
  • 11,871
  • 42
  • 107
  • 168
105
votes
3 answers

Is there a way to see the execution tree of systemd?

What I mean under the question is: is there a way to dump the ordered list (like pstree does for processes) to see how systemd executed the supplied set of units, i.e. the tree after the dependencies were resolved and jobs were queued for the…
galaxy
  • 2,089
  • 2
  • 15
  • 15
104
votes
12 answers

df says disk is full, but it is not

On a virtualized server running Ubuntu 10.04, df reports the following: # df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 7.4G 7.0G 0 100% / none 498M 160K 498M 1% /dev none …
Chris
  • 1,041
  • 2
  • 8
  • 3