Mattermost command not found

Hi all,

i tried to config mattermost with terminal, but i always got the error:
Mattermost: command not found

How could i add mattermost to terminal tools to use alle commands?

Hello, @aDriesel

Can you please confirm with me specifically the CLI command that you ran on your terminal and the directory path that you ran the command on?

For example, this is how I run the command on my end:

ahmaddanial@mattermost:/opt/mattermost$ sudo -u mattermost bin/mattermost channel list myteam
1 Like

Hi @ahmaddanial -

after updating to 6.2, mattermost cli is not working.

udo -u mattermost bin/mattermost user delete useremail@gmail.com --confirm
Error: unknown command “user” for “mattermost”

out put of Run ‘mattermost --help’ for usage.

/opt/mattermost# sudo -u mattermost bin/mattermost --help
Mattermost offers workplace messaging across web, PC and phones with archiving, search and integration with your existing systems. Documentation available at https://docs.mattermost.com

Usage:
mattermost [flags]
mattermost [command]

Available Commands:
completion generate the autocompletion script for the specified shell
db Commands related to the database
export Export data from Mattermost
help Help about any command
import Import data.
jobserver Start the Mattermost job server
server Run the Mattermost server
version Display version information

Flags:
-c, --config string Configuration file to use.
-h, --help help for mattermost

Use “mattermost [command] --help” for more information about a command.

Hello guys,
I encounter the same issue, any way to resolve it ?
Version : 6.5.0

That is not how you delete a user according the doc, and if you use the suggestion by the doc, you will encounter the exact error reported by @aDriesel

The doc says:

  1. Move to the root directory of MM (generally cd /opt/mattermost/)
  2. Run mattermost user delete {users} (where {user} is the user email)

And that throws:
Error: unknown command "user" for "mattermost"

And if you call --help you will see there is no such flag or command user

The reason is because of the type of install.
This happens when using the omnibus, and in that install, there is no such command to delete user.

The command to delete user is (and this is nowhere documented as far I saw):
mmctl user delete email@user.com --local
And, if that does not work, check 2 Issues / Questions that i cant find any solutions for - #5 by agriesser