To reindex Magneto 2 using CLI (Command Line Interface) please navigate to your Magento folder in a terminal and use command:

php bin/magento indexer:reindex

It will reindex all indexes. Here is an example of the success reindex execution:

Design Config Grid index has been rebuilt successfully in 00:00:00
Customer Grid index has been rebuilt successfully in 00:00:00
Category Products index has been rebuilt successfully in 00:00:01
Product Categories index has been rebuilt successfully in 00:00:00
Catalog Rule Product index has been rebuilt successfully in 00:00:01
Product EAV index has been rebuilt successfully in 00:00:02
Stock index has been rebuilt successfully in 00:00:00
Product Price index has been rebuilt successfully in 00:00:01
Catalog Product Rule index has been rebuilt successfully in 00:00:00
Catalog Search index has been rebuilt successfully in 00:00:02

In case you need to reindex some specific index type, please use its name at the end of the command. E.g.: 

php bin/magento indexer:reindex [indextype]

By default Magento 2 provides these index types:

design_config_grid,
customer_grid,
catalog_category_product,
catalog_product_category,
catalogrule_rule,
catalog_product_attribute,
cataloginventory_stock,
catalog_product_price,
catalogrule_product,
catalogsearch_fulltext

 

You can also learn how to reindex Magento 2 from admin panel.