---
title: "Menjalankan Perintah Incognito/Privat di Bash dan Zsh"
description: "Cukup tambahkan spasi sebelum perintah dan perintah tersebut tidak akan disimpan ke ~/.bash\\_history. Contoh:  qrencode -o out.png \"Some secret text\""
canonical: https://oozou.com/til/run-incognito-private-commands-for-bash-and-zsh-112
locale: id
date: 2020-12-08
topic: shell
---

# Menjalankan Perintah Incognito/Privat di Bash dan Zsh

> Cukup tambahkan spasi sebelum perintah dan perintah tersebut tidak akan disimpan ke ~/.bash\_history. Contoh:  qrencode -o out.png "Some secret text"

Published: 2020-12-08 · Topic: [shell](https://oozou.com/id/til-topics/shell) ([markdown](https://oozou.com/id/til-topics/shell.md))

# Bash

Cukup tambahkan spasi sebelum perintah dan perintah tersebut tidak akan disimpan ke `~/.bash\_history`. Contoh: ` qrencode -o out.png "Some secret text"`

# Zsh

Aktifkan opsi berikut agar Anda dapat menjalankan perintah privat dengan menambahkan spasi di depannya, sehingga perintah tersebut tidak disimpan ke `~/.zsh\_history`.

```
setopt HIST_IGNORE_SPACE
```

---

Contact OOZOU: hello@oozou.com · +66 2544 0000 · https://oozou.com/id/contact

More for AI agents: https://oozou.com/llms.txt · every page has a markdown twin at its URL plus ".md"
