How do I permanently set a PATH in Solaris?

How do I permanently set a PATH in Solaris?

1 Answer. Check /etc/default/login for login shells. You can force an initial path there. Adding your variables to /etc/profile should work, depending on the version of Solaris running.

How do I change Environment Variables in Solaris?

To Set JAVA_HOME and PATH on the Solaris Platform

  1. Log in as root by typing su – root .
  2. Set JAVA_HOME to /usr/j2se . In a C shell environment: # setenv JAVA_HOME /usr/j2se.
  3. Add /usr/j2se/bin to your system path.
  4. Place /usr/j2se/bin in your PATH before /usr/bin .
  5. Place /usr/bin in your PATH before /usr/ucb .

Can you change the default path in Solaris?

Also, keep in mind that you’re only changing the initial PATH for users. /etc/profile is read before a user’s .profile is read. By default, Solaris users will usually end up with their own .profile file that contains a default PATH.

How to set environment variables in Solaris advanced?

Setting Environment Variables (Solaris Advanced User’s Guide) Documentation Home > Solaris Advanced User’s Guide > Chapter 10 Customizing Your Working Environment > Setting Environment Variables Solaris Advanced User’s Guide Previous: Modifying Initialization Files Next: Setting Default File Permissions Setting Environment Variables

Can a bash shell be used in Solaris 11?

Solaris 11, where bash is the default shell will work ok with your profile, but older Solaris version may not parse the export PATH=… syntax as expected, or at all. Also, keep in mind that you’re only changing the initial PATH for users. /etc/profile is read before a user’s .profile is read.

Is there way to permanently set path in Linux?

As we saw, setting the PATH permanently in Linux has many options. You can set the PATH for only a certain user, for all users, or for only certain types of command shells. However, it’s a good idea to not fiddle with system-wide PATH settings unless you really know what you are doing.