"set" and "env" commands in Solaris 8

Posted on 2005-05-09
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
    LVL 38

    Accepted Solution

    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 20

    Expert Comment

    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

    A good doc for Shell Initialization Files:
    LVL 1

    Author Comment

    Thanks for the answer and sorry for the late reply.  

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
    Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now