<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: bash: service: command not found in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/bash-service-command-not-found/m-p/4590808#M39918</link>
    <description>you can check it as follows&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# which ifconfig&lt;BR /&gt;&lt;BR /&gt;it will give you the path where this command reside&lt;BR /&gt;&lt;BR /&gt;try to run it from that path&lt;BR /&gt;&lt;BR /&gt;#/usr/bin/ifconfig eth0&lt;BR /&gt;&lt;BR /&gt;like that&lt;BR /&gt;&lt;BR /&gt;and also you can set this path in your .profile like mentioned above.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Good luck</description>
    <pubDate>Thu, 25 Feb 2010 14:41:49 GMT</pubDate>
    <dc:creator>Jupinder Bedi</dc:creator>
    <dc:date>2010-02-25T14:41:49Z</dc:date>
    <item>
      <title>bash: service: command not found</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bash-service-command-not-found/m-p/4590805#M39915</link>
      <description>Hi All,&lt;BR /&gt;  When i was trying to restart or use any service, i got the error msg "bash: service: command not found" so i have to run the service from  "/etc/init.d/&lt;SERVICE_NAME&gt; &lt;PROCESS&gt;" and also the command "ifconfig" not working. Im still getting same error message. &lt;BR /&gt;&lt;BR /&gt;so can any one tell the real problem behind that.&lt;BR /&gt;&lt;/PROCESS&gt;&lt;/SERVICE_NAME&gt;</description>
      <pubDate>Thu, 25 Feb 2010 10:24:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bash-service-command-not-found/m-p/4590805#M39915</guid>
      <dc:creator>stripling20</dc:creator>
      <dc:date>2010-02-25T10:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: bash: service: command not found</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bash-service-command-not-found/m-p/4590806#M39916</link>
      <description>The path to those files is not in your PATH variable, so bash doesn't find them (verify with "echo $PATH").&lt;BR /&gt;&lt;BR /&gt;To solve it, edit ~/.profile and add those paths to the PATH variable (it should be defined there).</description>
      <pubDate>Thu, 25 Feb 2010 10:56:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bash-service-command-not-found/m-p/4590806#M39916</guid>
      <dc:creator>J. Maestre</dc:creator>
      <dc:date>2010-02-25T10:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: bash: service: command not found</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bash-service-command-not-found/m-p/4590807#M39917</link>
      <description>The root cause is a minor flaw in default login scripts: if you use "su" or "sudo -s" to become root, you will have root privileges but the PATH variable will include only the command directories intended for regular users. Some Linux distributions have already fixed this, others have not.&lt;BR /&gt;&lt;BR /&gt;The administrative commands like "service" and "ifconfig" are located in /sbin or /usr/sbin, which are normally not added to regular users' PATH.&lt;BR /&gt;&lt;BR /&gt;If you use "su -" or "sudo -i" (if your sudo version is recent enough) to become root, the environment of the root session is completely reinitialized and will include the sbin directories.&lt;BR /&gt;&lt;BR /&gt;If you need to fix it, find out which login scripts are executed when using your favorite method of becoming root, then add this to the appropriate script:&lt;BR /&gt;&lt;BR /&gt;export PATH="/sbin:/usr/sbin:/usr/local/sbin:$PATH"&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Thu, 25 Feb 2010 13:08:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bash-service-command-not-found/m-p/4590807#M39917</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2010-02-25T13:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: bash: service: command not found</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bash-service-command-not-found/m-p/4590808#M39918</link>
      <description>you can check it as follows&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# which ifconfig&lt;BR /&gt;&lt;BR /&gt;it will give you the path where this command reside&lt;BR /&gt;&lt;BR /&gt;try to run it from that path&lt;BR /&gt;&lt;BR /&gt;#/usr/bin/ifconfig eth0&lt;BR /&gt;&lt;BR /&gt;like that&lt;BR /&gt;&lt;BR /&gt;and also you can set this path in your .profile like mentioned above.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Good luck</description>
      <pubDate>Thu, 25 Feb 2010 14:41:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bash-service-command-not-found/m-p/4590808#M39918</guid>
      <dc:creator>Jupinder Bedi</dc:creator>
      <dc:date>2010-02-25T14:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: bash: service: command not found</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bash-service-command-not-found/m-p/4590809#M39919</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;/sbin/service&lt;BR /&gt;&lt;BR /&gt;That is where it is supposed to be. If its not at that location this could be the cause.&lt;BR /&gt;&lt;BR /&gt;If it is in /sbin then look at the PATH variable.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 25 Feb 2010 15:57:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bash-service-command-not-found/m-p/4590809#M39919</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2010-02-25T15:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: bash: service: command not found</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bash-service-command-not-found/m-p/4590810#M39920</link>
      <description>&lt;!--!*#--&gt;&amp;gt; # which ifconfig&lt;BR /&gt;&amp;gt; it will give you the path where this&lt;BR /&gt;&amp;gt; command reside&lt;BR /&gt;&amp;gt; try to run it from that path&lt;BR /&gt;&lt;BR /&gt;Sure, _if_ it's already _on_ your PATH.&lt;BR /&gt;Otherwise, you'll be wasting your time.&lt;BR /&gt;&lt;BR /&gt;      man which&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Good luck&lt;BR /&gt;&lt;BR /&gt;You'll need it, if you rely on advice like&lt;BR /&gt;this.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt; /sbin/service&lt;BR /&gt;&amp;gt; That is where it is supposed to be.&lt;BR /&gt;&lt;BR /&gt;That may depend on whose GNU/Linux kit you're&lt;BR /&gt;using.  Around here, for example:&lt;BR /&gt;&lt;BR /&gt;debi# service&lt;BR /&gt;-bash: service: command not found&lt;BR /&gt;&lt;BR /&gt;debi# ls -l /sbin/service&lt;BR /&gt;ls: cannot access /sbin/service: No such file or directory&lt;BR /&gt;&lt;BR /&gt;debi# man service&lt;BR /&gt;No manual entry for service&lt;BR /&gt;&lt;BR /&gt;debi# uname -a&lt;BR /&gt;Linux debi 2.6.26-2-mckinley #1 SMP Thu Nov 5 03:58:10 UTC 2009 ia64 GNU/Linux&lt;BR /&gt;&lt;BR /&gt;On the other hand:&lt;BR /&gt;&lt;BR /&gt;debi# which ifconfig&lt;BR /&gt;/sbin/ifconfig&lt;BR /&gt;&lt;BR /&gt;So, adding "/sbin" to your PATH would&lt;BR /&gt;probably be helpful.  (Obviously, it's on&lt;BR /&gt;mine.)&lt;BR /&gt;&lt;BR /&gt;General advice:&lt;BR /&gt;&lt;BR /&gt;Especially in a Linux forum, output from&lt;BR /&gt;"uname -a" can be helpful when asking about&lt;BR /&gt;almost anything.  Linux comes in many&lt;BR /&gt;different forms, and no one is born knowing&lt;BR /&gt;which one you're using.</description>
      <pubDate>Thu, 25 Feb 2010 16:14:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bash-service-command-not-found/m-p/4590810#M39920</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-02-25T16:14:48Z</dc:date>
    </item>
  </channel>
</rss>

