---
title: "Discussion on \"How to execute the last command with Sudo\" | Hashnode"
description: "Discussion on \"How to execute the last command with Sudo\". If you forgot to add sudo in your last command, you don’t need to type it completely. To execute ant last executed command by as superuser:\nsudo !!\n\nAlso, The double exclamation point will repeat the last command. This could be useful when you’ve alr..."
url: "https://hashnode.com/posts/how-to-execute-the-last-command-with-sudo/6390d01d120246e215ff9f95"
---

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

Discussion

# [How to execute the last command with Sudo](https://www.erdaltaskesen.com/how-to-execute-the-last-command-with-sudo?utm_source=hashnode&utm_medium=feed)

If you forgot to add sudo in your last command, you don’t need to type it completely. To execute ant last executed command by as superuser: sudo !! Also, The double exclamation point will repeat the last command. This could be useful when you’ve alr...

May 30, 2019 · 1 min read · erdaltaskesen.com  
Updated Dec 10, 2022  
Read the article

-   [#bash](https://hashnode.com/tag/bash)
-   [#tips-for-developers](https://hashnode.com/tag/tips-for-developers)
-   [#sudo](https://hashnode.com/tag/sudo)
-   [#cli-tips](https://hashnode.com/tag/cli-tips)

## Written by

[Erdal TAŞKESEN](https://hashnode.com/@erdaltsksn)

@erdaltsksn · Earth

  
[View profile](https://hashnode.com/@erdaltsksn)

Self-Taught Software Engineer, Day Trader, Investor, Entrepreneur, and Teacher

Hey, y’all 🖖🏽 I am a passionate self-taught developer, open-source advocate, and tech enthusiast with a hands-on approach to problem-solving and an unending thirst for knowledge. Anything and everything classified as technology fascinate me.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
