Splunk Search

Experiencing error :splunk: command not found

tgirgis
Engager

Hi,

Kinda new to *nix o/s; its been about 10 years. Anyway I have READ the doc's and checked the answers pages, but nothing has helped me solve this problem.

This was working last week, and now it isnt.

Came in on monday morning, turned on my splunk test server (ubuntu 10.04 LTS) and splunk wont start. the error is, u guessed it from the title:

splunk: command not found.

This is the same for all the executables for the splunk service.

Yes the files are executable, I have the proper installation for my O/S, PLEASE HELP!

Tags (3)
1 Solution

tgirgis
Engager

Hello,

TY, i had tried that as well and gotten an error.

for some reason I must, from /. type in sudo /opt/splunk/bin/splunk start i cannot simply cd to /opt/splunk/bin/ and then type splunk start, it doesnt work. At least I got it started.

🙂

View solution in original post

akansh
New Member

Check if you have downloaded the correct file for your OS.,I have found the real reason why this problem is coming up. If you are using the wget command from splunk website, this problem is raised because the link of file present in the box while copying is wrong.
Check after downloading that the file name should be same as as the file name started in code after 'wget -O' line.

0 Karma

araitz
Splunk Employee
Splunk Employee

On a linux OS, type:

source /opt/splunk/bin/setSplunkEnv

You can now start Splunk via the command:

splunk start

You can have your shell run the former command automagically at login so that you don't have to worry about it.

tarunchawla28
Engager

Yes, it worked. After this, "splunk " is available.

0 Karma

tgirgis
Engager

Hello,

TY, i had tried that as well and gotten an error.

for some reason I must, from /. type in sudo /opt/splunk/bin/splunk start i cannot simply cd to /opt/splunk/bin/ and then type splunk start, it doesnt work. At least I got it started.

🙂

evermmoreg
Engager

evermmoreg_0-1648639851014.png

 

0 Karma

Drainy
Champion

D'oh.
I forgot about permissions. You should just be able to run sudo from inside the bin directory aswell

Drainy
Champion

assuming a default install you need to run

[root@localhost bin]# ./splunk start

Inside the bin directory /opt/splunk/bin
The error you are seeing suggests that you may not have used the './' before the command, this is required to execute a command on a nix shell. (Not always but it would be a bit OT for me to go off about it here 🙂 )

VivekRavi
Engager

Thanks, this worked for me.

0 Karma

Alek_Splunk
Engager

This worked 🙂 , we can also use the above to stop the splunk.
thanks.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...