I have not used these commands under Linux before, but it is quite easy under Windows and I would assume similar in Linux.
It may help if you gave a bit more detail of what you have tried and where you are running into trouble. Are you getting a particular error? Do you not even know where to enter the commands?
On Windows these commands should be executed from the "Nios II 9.1 Command Shell" (or similar if you are using a different version). The installer for Nios II EDS should have created a link for this in your start menu.
In the command shell, simply execute the commands:
nios2-configure-sof filename.sof
nios2-download -g filename.elf
nios2-terminal