This is a How-To article that include installation and compile LaTeX file to PDF using Texmaker, Sublime Text 3, and Vim.

Install TeX Live

Install texlive-latex-extra instead of texlive-latex-base.

$sudo apt-get install texlive-latex-extra -y

Initial user tree in home directory

Before using tlmgr in user mode, you have to set up the user tree with the init-usertree action.
tlmgr is TeX Live package manager, you can run tlmgr --help for more detail.
The full documentation for tlmgr

$ tlmgr init-usertree
(running on Debian, switching to user mode!)

Install packages

Run tlmgr install package-name to install a package, if an error has occurred with following.

$ tlmgr install bytefield
(running on Debian, switching to user mode!)
/usr/bin/tlmgr: Initialization failed (in setup_unix_one):
/usr/bin/tlmgr: could not find a usable xzdec.
/usr/bin/tlmgr: Please install xzdec and try again.
Couldn't set up the necessary programs.
Installation of packages is not supported.
Please report to texlive@tug.org.
tlmgr: exiting unsuccessfully (status 1).  

Install zxedc to solve this problem.

$sudo apt-get install xzdec

If you have no problem with install a package

$ tlmgr install bytefield
(running on Debian, switching to user mode!)
tlmgr: package repository http://ftp.yzu.edu.tw/CTAN/systems/texlive/tlnet
[1/1, ??:??/??:??] install: bytefield [5k]
tlmgr: package log updated: /home/oopsmonk/texmf/web2c/tlmgr.log
running mktexlsr ...
done running mktexlsr.

Manually install packages

Install Editor

Here are some editors you can choose.

Hello LaTex

{% highlight tex %} \documentclass[12pt]{article} \begin{document} Hello world! $Hello world!$ %math mode \end{document} {% endhighlight %}

Save to hello.tex and compile to PDF
Texmaker

Sublime Text 3 with LaTeXTools

Vim with vimtex
launch Vim via vim --servername vimlatex

References:
在Mac系統上撰寫台大碩士論文(XeLaTex樣板)
tlmgr cannot setup TLPDB