Questions tagged [environment]

The O/S in which a process is executed, especially settings that affect the process

A computing environment consists of the following items:

  • Server hardware
  • Operating system
  • Software (both the software being used, and supporting software, such as and )
  • Data (input/output) from the software
  • Environment settings, such as executable PATH search directories

Commonly, for software development there are three main groups of environments:

2804 questions
770
votes
20 answers

Removing Conda environment

I want to remove a certain environment created with conda. How can I achieve that? Let's say I have an active testenv environment. I tried, by following documentation, with: $ conda env remove CondaEnvironmentError: cannot remove current…
renatodamas
  • 16,555
  • 8
  • 30
  • 51
432
votes
21 answers

Using Pip to install packages to Anaconda Environment

conda 4.2.13 MacOSX 10.12.1 I am trying to install packages from pip to a fresh environment (virtual) created using anaconda. In the Anaconda docs it says this is perfectly fine. It is done the same way as for virtualenv. Activate the…
jeffery_the_wind
  • 17,048
  • 34
  • 98
  • 160
425
votes
11 answers

How do I run a program with a different working directory from current, from Linux shell?

Using a Linux shell, how do I start a program with a different working directory from the current working directory? For example, I have a binary file helloworld that creates the file hello-world.txt in the current directory. This file is inside…
Anton Daneyko
  • 6,528
  • 5
  • 31
  • 59
370
votes
3 answers

Changing default shell in Linux

How is it possible to change the default shell? The env command currently says: SHELL=/bin/tcsh and I want to change that to Bash.
mahmood
  • 23,197
  • 49
  • 147
  • 242
350
votes
2 answers

Java system properties and environment variables

What's the difference between system properties System.getProperties() and environment variables System.getenv() in a JVM?
Praveen Sripati
  • 32,799
  • 16
  • 80
  • 117
245
votes
17 answers

Change the current directory from a Bash script

Is it possible to change current directory from a script? I want to create a utility for directory navigation in Bash. I have created a test script that looks like the following: #!/bin/bash cd /home/artemb When I execute the script from the Bash…
artemb
  • 9,251
  • 9
  • 48
  • 68
231
votes
9 answers

PowerShell: Setting an environment variable for a single command only

On Linux, I can do: $ FOO=BAR ./myscript to call "myscript" with the environment variable FOO being set. Is something similar possible in PowerShell, i.e. without having to first set the variable, call the command, and then unset the variable…
miracle2k
  • 29,597
  • 21
  • 65
  • 64
179
votes
17 answers

Best general SVN Ignore Pattern?

What is the best (or as good as possible) general SVN ignore pattern to use? There are a number of different IDE, editor, compiler, plug-in, platform, etc. specific files and some file types that "overlap" (i.e. desirable for some types projects…
174
votes
4 answers

Java current machine name and logged in user?

Is it possible to get the name of the currently logged in user (Windows/Unix) and the hostname of the machine? I assume it's just a property of some static environment class. I've found this for the user name com.sun.security.auth.module.NTSystem…
Omar Kooheji
  • 54,530
  • 68
  • 182
  • 238
173
votes
11 answers

How do I get the path of a process in Unix / Linux?

In a Windows environment there is an API to obtain the path which is running a process. Is there something similar in Unix / Linux? Or is there some other way to do that in these environments?
lsalamon
  • 7,998
  • 6
  • 50
  • 63
166
votes
8 answers

Can you get DB username, pw, database name in Rails?

I'm writing a rake task that does some DB work outside of Rails/ActiveRecord. Is there a way to get the DB connection info (host, username, password, DB name) for the current environment as defined in database.yml? I'd like to get it so I can use it…
Ethan
  • 57,819
  • 63
  • 187
  • 237
156
votes
6 answers

How to use an environment variable inside a quoted string in Bash

I've tried various forms of the following in a bash script: #!/bin/bash svn diff $@ --diff-cmd /usr/bin/diff -x "-y -w -p -W $COLUMNS" But I can't get the syntax to correctly expand the COLUMNS environment variable. I've tried various forms of the…
Jamie
  • 7,075
  • 12
  • 56
  • 86
147
votes
4 answers

Should aliases go in .bashrc or .bash_profile?

Possible Duplicate: What's the difference between .bashrc, .bash_profile, and .environment? It seems that if I use alias ls='ls -F' inside of .bashrc on Mac OS X, then the newly created shell will not have that alias. I need to type bash again…
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
133
votes
14 answers

Best way to create custom config options for my Rails app?

I need to create one config option for my Rails application. It can be the same for all environments. I found that if I set it in environment.rb, it's available in my views, which is exactly what I want... environment.rb AUDIOCAST_URI_FORMAT =…
Ethan
  • 57,819
  • 63
  • 187
  • 237
129
votes
7 answers

What's the difference between .bashrc, .bash_profile, and .environment?

I've used a number of different *nix-based systems of the years, and it seems like every flavor of Bash I use has a different algorithm for deciding which startup scripts to run. For the purposes of tasks like setting up environment variables and…
Adam Rosenfield
  • 390,455
  • 97
  • 512
  • 589
1
2 3
99 100