Go to Settings/Editor/General/Appearance and enable Show line numbers to permanently show line numbers for all editors.
The solution with View > Active Editor > Show Line Numbers seems to work only for the active editor (when you close the current tab or open a new file you have to enable it again).