Please explain "it doesn't work" (how it doesn't work? error messages?), and try to provide a simple example illustrating the issue. Did you read How do I run MrBayes in batch mode?
First you need to decide how you want to run MrBayes. If you type only mb (or mpirun -n #processors mb-mpi for multithreaded run), you are entering the interactive mode. It should give you a MrBayes > prompt. Once there, type execute example.nex and that will get things going unless there is an error. The program will tell you the exact line where the error occurred if something is wrong - you should report that message.
Please explain "it doesn't work" (how it doesn't work? error messages?), and try to provide a simple example illustrating the issue. Did you read How do I run MrBayes in batch mode?