Questions tagged [etc]

/etc is the directory that holds the essential system and software configuration. Use this tag for questions on the organization of /etc or the syntax of configuration files within /etc. Don't use this tag for questions on the configuration of particular software.

Filter by
Sorted by
Tagged with
89
votes
3answers
118k views

What do the scripts in /etc/profile.d do?

I am reading about basic shell scripting from Linux Command Line and Shell Scripting Bible. It says that the /etc/profile file sets the environment variables at startup of the Bash shell. The /etc/...
39
votes
3answers
32k views

/etc/hosts file refer to another configuration file

How can I get the /etc/hosts file to refer to another configuration file for it's list of hosts? Example /etc/hosts: ## My Hosts 127.0.0.1 localhost 255.255.255.255 broadcasthost #Other ...
38
votes
1answer
154k views

Where to find the Crontab logs in CentOS

First of all I'm using CentOS [root@a etc]# cat system-release CentOS release 6.5 (Final) [root@a cron.daily]# ps -ef | grep cron root 982 1 0 Jun14 ? 00:01:15 crond root ...
30
votes
9answers
7k views

How to keep track of changes in /etc/

I would like to keep track of changes in /etc/ Basically I'd like to know if a file was changed, by yum update or by a user and roll it back if I don't like the chage. I thought of using a VCS like ...
29
votes
1answer
5k views

Who creates /etc/{group,gshadow,passwd,shadow}-?

In any linux system I have access to (a couple of Archlinuxes, an Ubuntu, a Debian Sid and a Gentoo) there are the following 4 files in /etc/, all ending with a dash: /etc/group- /etc/gshadow- /etc/...
23
votes
3answers
61k views

Global bash_profile

I realize there are /etc/profile and /etc/bashrc files for setting global environment variables and maybe I'm just misunderstanding their purposes, but... Is there a global bash_profile file? I'm ...
22
votes
3answers
23k views

What is the purpose of /etc/hosts?

As I understand it, the hosts file is one of several system facilities that assists in addressing network nodes in a computer network. But what should be inside it? When I install Ubuntu by default ...
22
votes
1answer
7k views

/etc/udev/rules.d/ vs /lib/udev/rules.d/ - which to use and why?

The Arch wiki recommended creating a file in /etc/udev/rules.d/ to fix my Steam controller issues. This worked! However, I noticed that there are no other rules in this folder except for the one I ...
16
votes
1answer
45k views

No domain defined in /etc/resolv.conf

I see more and more servers that have no domain defined in the /etc/resolv.conf file. Only a search entry. In what cases is this setup used ? Are there any cases where it must not be used ? ...
16
votes
2answers
75k views

Error message id: cannot find name for group ID after logging in

BACKGROUND Trevor logs into his account on ssh://foobar.university.edu as one of the developers on the box, and he gets the message: id: cannot find name for group ID 131 Trevor then checks this ...
16
votes
1answer
3k views

Excluding files in etckeeper with .gitignore doesn't work

I use etckeeper for changes in my configfiles (on Debian squeeze) Since I also have an ircdeamon running, there are some files, that change every minute in the folder /etc/hybserv/ I don't want to ...
15
votes
2answers
3k views

What is the purpose of `/etc/group-`

On a standard Linux distribution (e.g. Ubuntu) there is usually /etc/group and /etc/group-, where the second one is only readable by root. man group only describes /etc/group. Thus my question: What ...
14
votes
6answers
8k views

What is the benefit of /etc/apt/sources.list.d over /etc/apt/sources.list

I know this question has been asked before, but I do not accept the answer, "you can clearly see custom additions". When I add ppa's (which I have not done in years), I hit a key on my keyboard ...
14
votes
3answers
63k views

How to check if a shared library is installed?

My question originates from my problem in getting ffmpeg started. I have installed ffmpeg and it is displayed as installed: whereis ffmpeg ffmpeg: /usr/bin/ffmpeg /usr/bin/X11/ffmpeg /usr/share/...
14
votes
3answers
1k views

version control for /etc under *BSD

What turnkey solutions exist to put /etc under version control, under various unices? Turnkey doesn't necessarily mean part of the base install, but the following features would be nice: hooks into ...
13
votes
3answers
9k views

How do I “merge” two text files?

I recently upgraded from Ubuntu 12.04 to 12.10 and at one point, it encountered an Apache config file conflict in apache2.conf. I didn't give me a merge option at that point, so I just rejected the ...
12
votes
5answers
44k views

What command should I run after making changes to /etc/passwd file

I have made some changes to /etc/passwd file ,now I wanted to see if the effect of changes taken place or not .What command should I run for that. For example after making change to /etc/ssh/...
12
votes
3answers
18k views

Is “/etc/issue” common for all Linux distributions?

I'm trying to Create OS detect portable function in bash script, So I just want to know, the file "/etc/issue" is common for all Linux Flavors ?
12
votes
2answers
5k views

Why is /etc/passwd open to public for reading?

Is there any reason that /etc/passwd should be world-wide readable ? It's not like password hashes that shouldn't be exposed, I just want to know why.
10
votes
1answer
4k views

Use `/etc/paths` or `/etc/paths.d` to add items to the PATH in macOS Sierra?

From what I have gleaned in various places with discussions about /usr/libexec/path_helper and all, apparently the modern way to add items to the environment variable PATH in macOS Sierra 10.12 is to ...
9
votes
1answer
2k views

Where does /etc/profile file in Debian come from?

Does it belong to some package or is it generated on install time? It looks like it isn't contained in any packages.
8
votes
5answers
3k views

if statement query user id in etc/passwd?

Using bash I am trying to query /etc/passwd for any users with an id over 1000. If they exist do something, else do something else. I'm stumped. Any help is appreciated. if [ "$(id -u)" -gt "1000" &...
8
votes
3answers
4k views

How to merge config files interactively after “yum update”

After system packages are updated with "yum update", config files which could not be overwritten are not replaced, but we can find *.rpmnew files near by. By design system administrator must merge ...
8
votes
2answers
681 views

How to get copies of default Linux etc files

Only sometimes, I forget to make a backup of a given linux file such as /etc/rc.local, /etc/rsyslog.conf, /etc/dhcpcd.conf, etc, and later wish I did. Distribution agnostic, is there a good approach ...
8
votes
1answer
2k views

/etc/paths in OS X and other Unices

Is /etc/paths read by every shell that I run in OS X? For example, if I use zsh, will it parse /etc/path to populate $PATH? What exactly is the sequence that OS X follows to populate $PATH? Does it ...
7
votes
3answers
4k views

The HOST variable in /etc/sudoers

suppose mymachine:/etc/sudoers includes the line joe someremotehost = (ALL) NOPASSWD: ALL but someremotehost:/etc/sudoers does not say anything special about joe, then what effect does the above ...
7
votes
1answer
517 views

Is it normal to have a file called “shadow-” in the /etc directory?

I am noticing a lot of weird files appearing in my router and on my various filesystems. Files in weird places or files that have to do with security with a - sign after them. If I do ls -l /etc/...
7
votes
1answer
8k views

What's the difference of `/etc/modules-load.d` and `/etc/modules`?

I red the introduction of them and found that, they both deal with module loading during boot time. So, what's the difference of these two different configuation ways?
6
votes
3answers
2k views

Is making /etc directory read only a bad idea?

I have an embedded system setup built using buildroot and using initramfs. It runs on compact flash device where I have created separate ext3 partitions to mount /etc/ and /var directories as well as ...
6
votes
3answers
262 views

Managing multiple configurations (/etc) - With a VCS?

I have a machine that needs to have two configurations that I need to maintain (the machine is occasionally moved between two environments and has different roles in each environment). Note: This is ...
4
votes
5answers
5k views

Moving /etc to separate partition

How to put /etc on separate partition? Obviously i can't do that by editing /etc/fstab like i did with /home, because... it's in /etc. I want /etc and /home on one partition (sda7), and the rest on ...
4
votes
1answer
512 views

configuration ethics (esthetics): /etc vs $HOME

Ok this may not be a very concrete question, and is perhaps subject to taste, yet I'm struggling to get this right so here it goes. I have a computer. This computer has linux on it (thank god). Arch ...
4
votes
3answers
5k views

How does /etc/hosts match work?

I'm curious about how /etc/hosts entries match works in Linux vs others *nix platform (if there is any difference). In particular I would be interested to understand if "match time" is proportional ...
4
votes
1answer
1k views

How to write an automatically sourced shell script to /etc/profile

I heard through the grapevine that files in /etc/profile will be automatically sourced by bash upon login? I tried writing something simple to /etc/profile: echo "echo 'foo'" > /etc/profile/foo....
4
votes
1answer
928 views

Why should one use update-locale instead of directly setting LANGUAGE?

In Debian, I am used to set the LANGUAGE environment variable in /etc/environment. Now with Debian testing I found /etc/default/locale, which is updated by update-locale. The update-locale man page ...
4
votes
1answer
472 views

Is there a way to tell which files in /etc were modified?

I want to create a mirror of my existing Debian server. I modified many files in /etc, and I don't want to redo everything by hand or download huge mirrors. What I thought of doing is Download a ...
4
votes
1answer
1k views

Is the last new line on fstab important?

What happens if the last line of fstab is not terminated by a newline? Why do people get a warning when that last line is not terminated by a newline?
4
votes
1answer
910 views

Which config files in /etc folder must be unique for each computer?

I am doing a restoration test of backup files on a computer. Without putting much thought into it, I did an rsync to replace all files in /etc folder with the ones in the backup. Then, I realize I ...
4
votes
2answers
73 views

How to switch between different Linux configurations?

I have several different use cases for my Raspberry Pi 3. Currently I have a configuration for it as a media centre, for streaming audio, for hacking purposes, office workplace, etc. All ...
4
votes
1answer
3k views

how to keep yum from updating a file I changed?

I'm running CentOS 6.8, I had changed /etc/rc.d/init.d/sendmail (something I couldn't do in /etc/sysconfig/sendmail) but yum overwrote the file when updating sendmail. Is there a way to configure yum ...
3
votes
2answers
3k views

What kind of file does /etc/inputrc belong to?

Seems like that the /etc/inputrc file conforms to the shell script syntax. But the file name does not end with a .sh. The first line in the file does not have a #!, either. Is it another kind of ...
3
votes
2answers
812 views

Which Debian package does /etc/environment come from?

I know that /etc/profile is installed by base-files, but it doesn't look like this package installs /etc/environment: $ dpkg -S /etc/environment dpkg-query: no path found matching pattern /etc/...
3
votes
1answer
8k views

Reload settings in /etc/fonts/conf.d

I am tweaking some font settings in Arch Linux. I have created a new .conf file in /etc/fonts/conf.avail/ and symlinked it into /etc/fonts/conf.d. I would now like to test the changes. I have tried ...
3
votes
1answer
3k views

Are http://cdn-fastly.deb.debian.org/ and deb.debian.org one and the same service?

Sometime back, I had noticed that httpredir.debian.org no longer works or works a bit weirdly. I started using cdn-fastly.debian.org . This is how my /etc/apt/sources.list is setup currently - $ cat ...
3
votes
2answers
104 views

Get package version of file

I've deleted a file in /etc provided by package packageA. Is there a way that I can reinstall only that file, provided I know where it is and which package provides it? I'm running Ubuntu 12.04 and ...
3
votes
1answer
8k views

Increasing nproc limit for a non-root user . Only effective by restart

I am increasing nproc limit for one of a development user account in my rhel6 system . After searching some rubust solution , I zerod at editing /etc/security/limits.conf with these two lines : ...
3
votes
1answer
8k views

Accidentally deleted /etc/network/interfaces on Ubuntu

I have accidentally deleted /etc/network/interfaces I have tried rebooting but the file still doesn't exist. Creating file and rebooting now.
3
votes
1answer
186 views

Question on environmental variable

I have Oracle jdk7 installed on my centos6. I noticed that the /etc/profile has the lines below: #below lines are added for Java export JAVA_HOME="/usr/java/latest" ## export JAVA_HOME JDK ## export ...
3
votes
1answer
154 views

Configuration management, shared files, etc with a Laptop

I have a couple computers sitting around in my home network. They all run the same version of Ubuntu, and I would like to unify their configuration to some extent. At my university, you can log in to ...
3
votes
1answer
2k views

is there a tool/daemon that automatically fills /etc/ethers in the background to have a proper wake on lan hostname:mac database when needed?

is there a tool/daemon available that automatically fills /etc/ethers in the background with the proper hostname:mac pairs to have a up to date database when needed with for example wake on lan (wol) ?...