UNIX - What is a sticky bit ?


The sticky bit was first introduced in 1974 within the UNIX operating system. Its purpose was to instruct the operating system to place the process into swap once completed. Thus reducing the startup time of the process during further executions. However nowdays this usage is obsolete.


Instead, the sticky bit is now set on a directory. With the intention to limit only the directory owner, the item owner or root to rename or delete any child items.
The sticky bit is represented by either a 't' or 'T' and is displayed within the execute permission section for 'others'.

[root@server ~]# ls -ld /tmp
drwxrwxrwt 11 root root 4096 Oct 24 22:09 /tmp

Difference between T`s

So you may be asking. What is the difference between 't' and 'T' ?
A lowercase 't' represents the "x" being unset, whereas 'T' represents the 'x' being unset.

-rwxrwxrwt - sticky bit and others execute bit set
-rwxrwxr-T - sticky bit is set and others execute bit is not set


To configure sticky on a directory the following command is used.

[root@server ~]# chmod +t /tmp/test/

[root@server ~]# ls -ld /tmp/test/
drwxrwxrwt 11 root root 4096 Oct 24 22:09 /tmp/test

Tags: UNIX

About the Author


R Donato

Rick Donato is the Founder and Chief Editor of He currently works as an SDN/NFV Solutions Architect and has a keen interest in automation and the cloud.

You can find Rick on Twitter @f3lix001