Find the answer to your Linux question:
Results 1 to 3 of 3
Hello all, A simple question today for those that may know. In bash, I can add the home directory to the path by adding a single line to /etc/profile like ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Dec 2006
    Posts
    104

    How to edit the path in CSH


    Hello all,

    A simple question today for those that may know.

    In bash, I can add the home directory to the path by adding a single line to /etc/profile like this:

    PATH=$PATH:.

    How do I do this for CSH and what file do I edit?

    Thanks!
    Sol

  2. #2
    Linux Newbie
    Join Date
    Jan 2008
    Location
    UK
    Posts
    211
    Hi Sol, have a look in /etc/csh.login.

  3. #3
    Linux Newbie
    Join Date
    Dec 2006
    Posts
    104
    Quote Originally Posted by wowbag1 View Post
    Hi Sol, have a look in /etc/csh.login.
    Thanks, wowbag1. Adding this line to csh.login did the trick:

    setenv PATH ${HOME}:${PATH}

    It adds the home directory to the path and also preserves the existing path.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •