Questions tagged [configuration]

The action of modifying a program's behavior, generally by modifying a text file.

How to configure a program

Traditionally, there are 3 ways of configuring the behavior of a program:

  1. System wide configuration files
  2. User specific configuration files
  3. Compiling options

A few conventions about configuration files:

  • Configuration is stored in text files (as opposed to binaries or anything similar to the Windows registry).
  • System wide configuration files are located in /etc.
  • User specific configuration files are located in the user's home directory.
  • Configuration files have names ending with the suffix rc. Example: /etc/vimrc.
  • User specific configuration files are hidden by prefixing them with a dot (.). Example: ~/.bashrc.
  • Compiling options are only available at compile time and cannot be changed afterwards. On systems using binary package management, the package maintainer is in charge of selecting the appropriate options.

Further Reading

1541 questions
287
votes
7 answers

What do options `ServerAliveInterval` and `ClientAliveInterval` in sshd_config do exactly?

I found this question, but I'm sorry I don't quite understand the settings on the two variables ServerAliveInterval and ClientAliveInterval mentioned in the accepted response. If my local server is timing out, should I set this value to zero? Will…
M. Tibbits
  • 3,157
  • 2
  • 17
  • 9
124
votes
6 answers

How to properly and easily configure `xdg-open` without any environment?

I'm using OpenBox window manager without any desktop environment. xdg-open behaves strangely. It opens everything with firefox. $ xdg-settings --list Known properties: default-web-browser Default web browser I'm looking for a simple…
kravemir
  • 4,014
  • 4
  • 33
  • 48
96
votes
4 answers

Tmux mouse-mode on does not allow to select text with mouse

I'm using tmux 2.1 and tried to on mouse mode with set -g mouse on And it works fine, I can switch across tmux window splits by clicking the appropriate window. But the downside of this is that I cannot select text with mouse. Here is how it looks…
Dmitrii Bundin
  • 1,073
  • 1
  • 7
  • 7
95
votes
4 answers

Purpose and typical usage of /etc/rc.local

The header looks like this: #!/bin/sh -e # # rc.local - executed at the end of each multiuser runlevel # # Make sure that the script will "exit 0" on success or any other # value on error. What is the reason for this file (it does not contain…
Emanuel Berg
  • 6,763
  • 7
  • 43
  • 65
74
votes
7 answers

How can I set customise settings for htop?

Occasionally, I need to check resources on several machines throughout our data centres for consolidation recommendations. I prefer htop primarily because of the interactive feel and the display. Is there a way to customise some settings to my setup…
MrDuk
  • 1,527
  • 2
  • 13
  • 27
73
votes
6 answers

How do I cycle through panes inside a window in tmux like in screen?

I thought Moving tmux pane to window was the same question but it doesn't seem to be. Coming from using GNU screen regularly, I'm looking for tmux to do the same things. On of the things I do regularly is have a couple of different windows open,…
FooBar
  • 833
  • 1
  • 7
  • 7
69
votes
5 answers

Where in Apache 2 do you set the ServerName directive globally?

NOTE: This is related to my question: "Apache 2.4 won't reload, any problem with my configuration?". I'm trying to test a local site, locally. As I understand Apache 2 (and perhaps Apache as well) has something called VirtualHost. My little bit of…
shirish
  • 11,967
  • 27
  • 107
  • 190
52
votes
1 answer

gvim -p limit of opened tabs?

When I run : gvim -p *.xyz I find that not all files are opened in tabs. It feels, like a kind of tab limit? But ! When I try to open unopened with : :tabnew it is opened next to previous tabs - it works ! How to make gvim -p ... to open all…
Grzegorz Wierzowiecki
  • 13,865
  • 23
  • 89
  • 137
49
votes
1 answer

Display full settings of sshd

The OpenSSH daemon has many "default" values for its settings. So looking at the sshd_config might not give someone the complete set of active settings. How to display the full sshd configuration (for OpenSSH)?
Huygens
  • 8,985
  • 3
  • 31
  • 36
47
votes
5 answers

Is there a 'rc' configuration file for grep/egrep? (~/.egreprc?)

I usually use grep when developing, and there are some extensions that I always want to exclude (like *.pyc). Is it possible to create a ~/.egreprc or something like that, and add filtering to exclude pyc files from all results? Is this possible, or…
47
votes
5 answers

Is it possible to include file in config file of zsh? How?

I'd like to have a file eg. f with only zsh aliases (pureness reasons). Then I'd like to include f file in my .zshrc file, so that the aliases defined in f are visible in .zshrc. Is it possible? If it is, I could create a script eg. my_alias…
xliiv
  • 849
  • 2
  • 9
  • 16
46
votes
3 answers

Why do some applications use ~/.config/appname for their config data while others use ~/.appname?

I've noticed that some applications put their configuration files to ~/.config/appname while others use ~/.appname (the classic way, AFAIK) for this. What's the sense in this distinction and what could be better to consider for an application of…
Ivan
  • 17,368
  • 35
  • 93
  • 118
39
votes
1 answer

Understanding home configuration file locations: ~/, ~/.config/ and ~/.local/share/

There are a number of hidden configuration files in my home directory: some of them are in ~/ (e.g. ~/.cinnamon) some of them are in ~/.config/ (e.g. ~/.config/cinnamon-session) some of them are in ~/.local/share/ (e.g.…
Elliptical view
  • 3,559
  • 4
  • 25
  • 44
34
votes
3 answers

Finding out the values of kernel options related to sysctl.conf and sysctl.d

On my Ubuntu machine, in /etc/sysctl.conf file, I've got reverse path filtering options commented out by default like this: #net.ipv4.conf.default.rp_filter=1 #net.ipv4.conf.all.rp_filter=1 but in /etc/sysctl.d/10-network-security.conf they are…
Desmond Hume
  • 2,718
  • 5
  • 21
  • 21
31
votes
2 answers

What's the difference between /etc/rc.local and /etc/init.d/rc.local?

I want to add a permanent iptables rule to my new VPS, and after brief google search i was surprised that there are two places this rule can be added, that seems like identical: /etc/rc.local and /etc/init.d/rc.local. Maybe someone knows why where…
grigoryvp
  • 413
  • 1
  • 4
  • 6
1
2 3
99 100