[Last Call] Learn how to a build a cloud-first strategyRegister Now


"set" and "env" commands in Solaris 8

Posted on 2005-05-09
Medium Priority
Last Modified: 2013-12-21
When I type "set" and "env" commands I get a certain list of values where paths, variables, files are defined.  From WHERE do set and env get their info from???  How can I edit these files so when I type "set" and "env" and get the desired paths/variables.
Question by:ROCK1972
  • 2
LVL 38

Accepted Solution

yuzh earned 1000 total points
ID: 13965967
Here's a list of possible files to set the ENV vars including PATH:

      $HOME/.profile            #sh/ksh/bash
      $HOME/.login              #for csh/tcsh
      $HOME/.cshrc              #for chs/tcsh
      $HOME/.kshrc              #ksh
      $HOME/.dtprofile           #GUI desktop
      $HOME/.bash_profile     #bash
      $HOME/.bash_login        #bash

      PS: $HOME is the user's home dir, after you login to the system, type in:
            echo $SHELL
            to find out which one is your default login shell (or look at /etc/passwd file)
            eg, if your login shell is ksh, do:
            man ksh
            to find out which one to use.
LVL 21

Expert Comment

ID: 13965969
sh/ksh/bash: /etc/profile and $HOME/.profile  (and possibly other "." files in your home directory)
csh: /etc/login and $HOME/.login + .cshrc

LVL 38

Expert Comment

ID: 13966000
A good doc for Shell Initialization Files:

Author Comment

ID: 14012288
Thanks for the answer and sorry for the late reply.  

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month18 days, 13 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question