O Número de Identificação Fiscal (NIF) - Tax identification number
One of the first things you need to do when you decide to live in Portugal is the NIF - Tax identification number.
Portuguese people who hold a national identity card are automatically assigned one.
NIF is something like an ID/VAT number for companies. No, it's not an ID number. It's the tax number you enter when you make a purchase, sign a lease, contract with an operator, buy a car or log into a government online portal.
You apply for a NIF at the tax office.
When processing your NIF, you will most likely still have a permanent residence in your country of birth, which you must report to the office and which the official will enter into the system according to your citizenship. Then, within about 2 weeks, you will receive a letter from the Portuguese government at the address of your permanent residence with the granting of an access password to the online system (portaldasfinancas.gov.pt)
If you intend to establish a company, your company will have its own NIF. But first, you have to arrange the NIF for you as a private person.