Linux tools

Facebook Messenger CLI Chat Via Linux Terminal

Hi, fellow Linux user there! How is your social life going? This is how most of the time I think my friends ask me. They think that I am all the time messed with the terminal. Now how to explain to Windows users that Terminal does almost all my work from games to app installation. From email to personal messages. Leave them! Today I am here with an amazing terminal software call “FB Messenger CLI”.
This helps us to read, write and send our messages through terminal! Voila! Now you can even socialize when messing with root or destroying your PC (Laugh). No more time waste. Let us get to know how to to get it.

GitHub Page:- Here


​You are required to have NPM and Node.js preinstalled in order to get the Fb Messenger CLI working. If you are already having them, skip this part and proceed to next. If not, get it now. To get NPM and Node.js, just hit this command in terminal.

For version 6

curl -sL | sudo -E bash -
sudo apt-get install -y nodejs

For version 7

curl -sL | sudo -E bash -
sudo apt-get install -y nodejs
Now install build tools
sudo apt-get install -y build-essential
​If asked run Sudo command with root. I switched to root mode after hitting curl command. If the password is asked, type it. Nothing will be displayed and this is normal.

install facebook messenger cli for linux

​Your PC is now ready. Proceed to installation now.


​Go root first. This can be done by typing su and entering your password. Now Hit this command in terminal.

npm install -g fb-messenger-cli
​Now, wait, the installation will be done as per your internet speed.

launch facebook messenger cli in linux terminal

​After the installation is done. Now type this to launch it.
​You will be asked for Facebook email id and password. Input and hit enter. You will soon see your messaging section.

signin to facebook messenger cli

How to use Facebook messenger CLI?

​Using it is very easy. Just input the number in front of the message with whom you want to talk and hit enter. You will be taken to message or chat.

send messages with facebook messenger cli in terminal

​In case you need some help, type /help and hit enter. A help panel will be displayed.

facebook messenger help menu

​You are all setup! Go enjoy the social life.


​FB Messenger for CLI is much more or less works like Mutt that I mentioned in one of my articles. It’s lightweight, fast and works great on command. It is pretty sure going to be useful for me as I am most of the time busy in my terminal with something messy. You should try it and tell us how you like it. I am waiting for your comment.


Nanda November 2, 2019 at 1:29 pm

For me doesn’t work!!

Ubuntu 19.10

Sohail November 4, 2019 at 11:49 pm

Please share the specific error you get?

Cato November 9, 2019 at 2:56 am

This is what happened whe i tried to install it…

~# npm install -g fb-messenger-cli
/usr/bin/fb-messenger-cli -> /usr/lib/node_modules/fb-messenger-cli/cli.js

> [email protected].0 install /usr/lib/node_modules/fb-messenger-cli/node_modules/puppeteer
> node install.js

ERROR: Failed to download Chromium r686378! Set “PUPPETEER_SKIP_CHROMIUM_DOWNLOAD” env variable to skip download.
Error: EACCES: permission denied, mkdir ‘/usr/lib/node_modules/fb-messenger-cli/node_modules/puppeteer/.local-chromium’
at BrowserFetcher. (/usr/lib/node_modules/fb-messenger-cli/node_modules/puppeteer/lib/helper.js:111:15)
at Object. (/usr/lib/node_modules/fb-messenger-cli/node_modules/puppeteer/install.js:64:16)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1103:10)
at Module.load (internal/modules/cjs/loader.js:914:32)
at Function.Module._load (internal/modules/cjs/loader.js:822:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1143:12)
at internal/main/run_main_module.js:16:11 {
errno: -13,
code: ‘EACCES’,
syscall: ‘mkdir’,
path: ‘/usr/lib/node_modules/fb-messenger-cli/node_modules/puppeteer/.local-chromium’
npm ERR! errno 1
npm ERR! [email protected].0 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected].0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-11-08T23_54_35_197Z-debug.log

Pefterns December 27, 2019 at 4:04 am

Same here

Wilson November 18, 2019 at 7:17 pm

Exactly, it doesn’t work with ubuntu 19.04

Sohail November 18, 2019 at 8:09 pm

Hi Wilson, What specific error do you get?

Wilson November 18, 2019 at 7:19 pm

Exactly, it doesn’t work with ubuntu 19.04
It generates the following message. [email protected]:~/wspowerfin/tomcat$ sudo fb-messenger-cli
Login verification failed: No saved profile, please login
Facebook credentials:
Email: wil*****
Password: *******************
Attempting login…
Fetching login cookie
Browser resolved
Waiting 20 seconds for login page
Error while logging in Could not login in time
Browser properly closed
Login verification failed: Could not login in time
Exiting. Please try again.

Sohail November 18, 2019 at 8:15 pm

Hi Wilson,

I have seen so many people having this issue. I got this on the official Github repo.

Hope it helps you.

Wilson November 19, 2019 at 7:20 pm

Great, I got it, thanks.

Sohail November 19, 2019 at 7:50 pm

Whoop whoop!

DarwinVA July 4, 2020 at 1:30 pm

Don’t works withou GUI because it need enable permission for login with chromium (puppeteer)


Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.