---
name: "TIOCSTI"
section: "2const"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/TIOCSTI"
---

# TIOCSTI(2const)

faking input

## NAME

TIOCSTI - faking input

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <asm/termbits.h>  /* Definition of TIOCSTI */
#include <sys/ioctl.h>
```

**int ioctl(int** *fd***, TIOCSTI, const char \****argp***);**

## DESCRIPTION

Insert the given byte in the input queue.

Since Linux 6.2, this operation may require the **CAP\_SYS\_ADMIN** capability (if the *dev.tty.legacy\_tiocsti* sysctl variable is set to false).

## RETURN VALUE

On success, 0 is returned. On error, -1 is returned, and *errno* is set to indicate the error.

## ERRORS

- **EPERM**

  Insufficient permission.

## SEE ALSO

[**ioctl**(2)](/ioctl/2.md), [**ioctl\_tty**(2)](/ioctl_tty/2.md)
