The terminal is where everything gets done in linux.

So if this is true, how can I play an AVI video (.avi extension) from the Terminal?

4 Answers 4


The syntax to open any file in its default application is

xdg-open <file_name>

If you want to have some fun and play the video in the terminal itself, install mplayer (sudo apt-get install mplayer) and run

mplayer -vo caca <movie_file>

It doesn't run directly in the terminal window, but it does display in ASCII characters.

  • xdg-open name.mov worked for me in Ubuntu 14.04 from Terminal connected using SSH. The other one showed things very weirdly. Thanks
    – Mona Jalal
    Jan 25, 2017 at 7:39
  • @MonaJalal haha the second one was just a fun command that tries to display the movie as ascii characters within the terminal. Feb 17, 2017 at 23:29

In general you start any command from a terminal by entering the command.

So to edit a file with gedit

gedit file_to_edit

An .avi is no different, just a different command

banshee your.avi

You may use any media player you wish.

the only thing is an avi itself is a container, so you may need to install some codecs. codecs are the tools to play mp3 and other audio visual files.

this link may help


  • 3
    general syntax is <program> <file to be played> Dec 11, 2011 at 5:01

totem can be anoter option. On my fresh installed Xenial it's the app that opens movie files from nautilus. It's available from Precise.

  • 1
    In addition to this, totem is the default video player for Gnome, and if you want to play video that requires authentication, like for example a password-protected video, typing totem 'url', will launch the player and ask you for a username/password
    – smac89
    Jan 19, 2017 at 21:09

Even arguments can be used, in terminal:

videoplayer-name videoplayer-arguments path-to-file

Path to file can be easily entered by dragging and dropping the file onto the terminal window.

Example, to only listen to the music of a video concert:

mpv --no-video file-dropped-onto-terminal-window

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.