Well first of all the question is why do you need this, there should be generally no need for this.
But generally to enter such commands you would need to access the command line.
Details how to access OSMC via command line locally or via ssh can be found here: Accessing the command line - General - OSMC"