As part of a narrative verdict, cornoner Keith Wiseman said that the culture of heavy drinking in the Royal Navy must stop if events like the tragic shooting of an officer onboard the nuclear submarine are to be avoided in trhe future.
Mr Wiseman called for the rules to be changed to prevent any sailior drinking within 24 hours of going on duty.
He said he was entirely satisifed that able seaman Ryan Donovan was "drunk" when he began firing his SA80 rife, killing Lt Cmdr Ian Molyneux, in April 2011.
The cornoer also said he believed there should be mandatory tests for the presence of alchol rather than the sysmte that was in place at the time by which senior officers had to judge whether someone was fit for duty.
The inquest into Lieutenant Commander Ian Molyneux's death on board HMS Astute that Donovan had been drinking heavily in the 48 hours before he went on his shooting spree.
The hearing has previously heard he had drunk 20 pints of cider and lager, cocktails and double vodkas in the 48 hours before he was put on a guard duty with the SA80 rifle.
Police investigating the murder were so concerned about binge drinking by the crew while ashore, that the senior officer wrote to his chief constable to highlight the issue and it was passed to military authorities.
The Royal Navy has since tightened its rules on alcohol consumption before duty.
Donovan had also told colleagues he intended to shoot someone.
Father-of-four Lt Cdr Molyneux, 36, was shot in the head at point blank range as he attempted to confront Donovan, after he began firing his semi-automatic SA80 rifle.
He died at the scene from his injuries.
Donovan, who was 22 at the time of the incident, is currently serving a life sentence for murder and attempted murder, after admitting carrying out the shooting.
The navigator yeoman also pleaded guilty to attempting to murder Lieutenant Commander Christopher Hodge, 45, who was shot in the stomach.
The court heard that his real targets, whom he also admitted to attempting to murder, were Petty Officer Christopher Brown, 36, and Chief Petty Officer David McCoy, 37.
Southampton coroner Keith Wiseman told the end of the inquest into the death of Lieutenant Commander Ian Molyneux that he would write to the Navy with 18 areas it should look at.
He said it was ''a miracle'' no-one else had died during the gun rampage during a civic visit by Southampton's mayor and also schoolchildren who had just left when Donovan started firing.
He said he would incorporate recommendations from Lt Cdr Molyneux's widow Gillian, which included the random crew breath testing, the use of a breathalyser for all those going on armed sentry duty, a look at alcohol allowances while onboard ships and, in particular, on submarines, work to tackle the culture of binge drinking in the navy and the issuing of handheld breath testing devices to all personnel.
Recording a narrative verdict, the coroner said the officer was unlawfully killed and he will now write to the Navy citing the issues under what is called a Rule 43 letter.
''Random testing has some value. Anyone being drunk, or anywhere near drunk, on duty has, in my view, got to stop.
''It is an unfair responsibility to be given to someone carrying out little more than a spot check. In my view the routine use of the appropriate machinery to at least establish the absence of alcohol in the system is necessary as I'm not convinced that the concept of heavy drinking on leave periods is likely to alter very much.
''On an intense personal note this criminal action has left one family bereaved in the most appalling circumstances.''