Questions tagged [rc]

An RC file is a script file containing startup instructions for an application program (or an entire operating system). These are usually a text file containing commands of the sort that might have been invoked manually once the system was running but are to be executed automatically each time the system starts up.

An RC file – also known as a configuration file – is a script file containing startup instructions for an application program (or an entire operating system). These are usually a text file containing commands of the sort that might have been invoked manually once the system was running but are to be executed automatically each time the system starts up.

Programs that support RC files include vi/vim and most shells. Some examples of RC file names would be .bashrc (for bash), .zshrc (for the Z shell), .vimrc (for vim), etc. Typically, the name of these files end in "rc"; and they often begin with "." to hide them.

"RC" stands for either "run commands" or "run control". It is a throwback to Unix's grandparent, CTSS, which had a command-script feature called "runcom" – "run commands". Early Unixes used ‘rc’ for the name of the operating system's boot script, as a tribute to CTSS runcom. This convention was then carried over to other unix programs.

119 questions
19
votes
1 answer

What is the difference between .exrc and .vimrc?

I know from experience that the ~/.exrc file can be used to configure vim. I also know that the ~/.vimrc file can be used for the same purpose. However, If I use .exrc to configure vim, this leads to problems on systems where vi is installed rather…
Sildoreth
  • 1,822
  • 8
  • 23
  • 40
13
votes
1 answer

zsh: is there a problem with always enabling extended glob?

I recetnly came across setopt extended_glob ...in order to enable extended globbing which allows for a number of cool wildcard additions, like excluding specific patterns, for example: ls ^foo* ...will use ls on every path in your current…
daniel451
  • 1,017
  • 6
  • 13
  • 26
9
votes
1 answer

Why do we daemonize processes?

I've read and understood about how you create a daemon process, but from everything I read I never really understood why it needs to be done. I've read that we do the fork - setsid - fork to avoid the process to gain control of a terminal, but what…
lesurp
  • 193
  • 1
  • 3
9
votes
2 answers

Run .zshrc when passing command via -c

I have a script that runs a command via zsh -c. However, when zsh runs, it doesn't appear to load ~/.zshrc. I understand a login shell flag exists, but even zsh -lc doesn't seem to work. How can I get functions, aliases, and variables…
7
votes
1 answer

Change the direction of a new client appearance in Awesome Window Manager

In previous releases of Awesome WM new client title appeared to the right from the previous client. So, client titles were ordered from left to right by their order of appearance. In new releases of Awesome this order has reversed. Quit naggingly,…
den2042
  • 351
  • 2
  • 7
6
votes
2 answers

How can I customize $PROMPT_COMMAND without overwriting the default (if present)?

Mac's Terminal comes with a default PROMPT_COMMAND that checks the history and updates the current working directory (title of the tab): Add echo $PROMPT_COMMAND to the top of your .bash_profile and you'll see: shell_session_history_check;…
JBallin
  • 361
  • 4
  • 13
6
votes
3 answers

How to properly enable httpd with rcctl on OpenBSD so that it starts automatically?

On a OpenBSD machine running OpenBSD 6.2 amd64, httpd cannot be started by using rcctl: # rcctl start httpd httpd(failed) However, when started by just entering httpd, it works; but this is not the way to go, I guess. /var/log/messages does not…
Michael Kremser
  • 149
  • 2
  • 8
6
votes
1 answer

OpenBox Mouse binding for dragging window to screen edge

I am trying to edit the lxde-rc.xml file (in ~/.config/openbox) so I can implement Window snapping like in Microsoft Windows. When a window is dragged to the right edge of the screen, it maximizes to fill the right half of the screen. I don't want…
Julius Naeumann
  • 183
  • 1
  • 3
5
votes
0 answers

FreeBSD: How to start a python script as daemon?

I'm facing an issue with a python file that I'd like to start as a service. I named my service ocrserver and the script I want to start is in /home/administrator/ocr/ocrserver/init.py with some parameters added like --address --port etc... After…
onizukaek
  • 151
  • 1
  • 3
5
votes
1 answer

Stow doesn't use the "ignore" option given in the rc file

Summary --ignore= lines that I put in my .stowrc does not work. When running Stow, it says "Loading defaults from .stowrc", yet it has no effect. But passing the --ignore= lines to the command directly works. Problem Assume this…
Guildenstern
  • 420
  • 4
  • 11
4
votes
1 answer

How to properly use Gentoo Linux as a supplement to an existing distribution?

While I originally wanted to entirely replace the Linux distribution my NAS uses, I meanwhile came to the conclusion that it would be better to leave the existing system as unmodified as possible and merely supplement it via Gentoo (or Arch) Linux -…
Tobias Kienzler
  • 9,184
  • 13
  • 65
  • 106
4
votes
3 answers

Is it possible to have conditionals in /etc/rc.local?

Is it possible to have a conditional within /etc/rc.local? I've checked many Q&As and most people suggest running chmod +x on it, but my problem is different. It actually does work for me without conditionals, but doesn't otherwise. #!/bin/sh if [[…
aderchox
  • 631
  • 7
  • 13
4
votes
1 answer

FreeBSD sysrc to add comments

Is there a way to use FreeBSDs sysrc to add comments to the file that it’s modifying? For example, if I had an /etc/rc.conf with the standard…
Allan
  • 1,010
  • 3
  • 15
  • 31
4
votes
1 answer

.bashrc or .profile for busybox on windows

I have enough experience with scripting on *nix servers, but busybox on Windows I enjoy first. I installed busybox using scoop. When I run: ash echo $HOME I got -> C:/Users/RO # OK, this is dir of my windows profile I thought I could put it in…
roze
  • 41
  • 2
4
votes
2 answers

Why is rcS required after file system is mounted by the kernel?

I using embedded Linux, I have compiled the kernel without initramfs and kernel is booting fine. But It shows me rcS file is not found I have put it in /etc/init.d/rcS and my rcS file look like #!/bin/sh echo "Hello world" After the file system is…
Shantanu Banerjee
  • 449
  • 3
  • 6
  • 15
1
2 3 4 5 6 7 8