---
title: "Discussion on \"Run the Last Command as sudo in Ubuntu\" | Hashnode"
description: "Discussion on \"Run the Last Command as sudo in Ubuntu\". Have you found yourself running a command only to realise you need superuser privileges? Instead of retyping everything, there’s a quick method to run the last command as sudo in Ubuntu.\nTo do this, simply type sudo !! and hit Enter. What’s happening..."
url: "https://hashnode.com/posts/run-the-last-command-as-sudo-in-ubuntu/67357331f1d1a078a1f8818a"
---

[Feed](https://hashnode.com/feed) /

Discussion

[Muhammed](https://hashnode.com/@bravo744)

Nov 14, 2024

# [Run the Last Command as sudo in Ubuntu](https://25000cheats.com/run-the-last-command-as-sudo-in-ubuntu?utm_source=hashnode&utm_medium=feed)

Have you found yourself running a command only to realise you need superuser privileges? Instead of retyping everything, there’s a quick method to run the last command as sudo in Ubuntu. To do this, simply type sudo !! and hit Enter. What’s happening...

25000cheats.com 1 min read

[#ubuntu](https://hashnode.com/tag/ubuntu) [#terminal](https://hashnode.com/tag/terminal) [#terminal-command](https://hashnode.com/tag/terminal-command) [#sudo](https://hashnode.com/tag/sudo)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
