{{short description|Shell command for removing non-essential information from executable code files}} {{More citations needed|date=December 2020}} {{Lowercase title}} {{Infobox software | name = strip | logo = | screenshot = | screenshot size = | caption = | author = Dennis Ritchie<br />(AT&T Bell Laboratories) | developer = Various open-source and commercial developers | released = {{Start date and age|1972|6|12}} | latest release version = | latest release date = | programming language = C | operating system = Unix, Unix-like, Plan 9, Microsoft Windows | platform = Cross-platform | genre = Command | license = Plan 9: MIT License | website = }} <code>'''strip'''</code> is a shell command for removing information from binary executable programs and object files that is not required for execution {{endash}} typically including debugging data, symbol tables, relocation information, and other metadata. The resulting file will have a smaller size. This is also known as a '''stripped binary'''.<ref>{{Cite web |title=Linux Strip Command |url=https://www.computerhope.com/unix/strip.htm |access-date=2024-10-01 |website=www.computerhope.com |language=en |archive-date=2024-09-13 |archive-url=https://web.archive.org/web/20240913091426/https://www.computerhope.com/unix/strip.htm |url-status=live }}</ref>
Using <code>strip</code> can enhance the security of an executable by making it more difficult to reverse-engineer. The absence of symbol and debugging information complicates the program analysis of the binary.
The effect of <code>strip</code> can also be achieved via a compiler or linker to perform the same process.<ref name=":0">{{Cite web |title=What is the difference between "gcc -s" and a "strip" command? |url=https://stackoverflow.com/questions/1349166/what-is-the-difference-between-gcc-s-and-a-strip-command |access-date=2024-10-01 |website=Stack Overflow |language=en |archive-date=2024-09-25 |archive-url=https://web.archive.org/web/20240925113329/https://stackoverflow.com/questions/1349166/what-is-the-difference-between-gcc-s-and-a-strip-command |url-status=live }}</ref> For example, in the GNU C compiler (gcc), this is done via the <code>-s</code> option.<ref name=":0" />
The command is available in Unix, Plan 9, and Unix-like systems. The GNU Project includes an implementation in the GNU Binutils package. The command has been implemented in to other operating systems including Windows.
== See also == {{Portal|Free and open-source software}} * {{Annotated link|Dead code elimination}} * {{Annotated link|Debug symbol}} * {{Annotated link|Executable compression}} * {{Annotated link|List of POSIX commands}} * {{Annotated link|strings (Unix)}} * {{Annotated link|Symbol table}}
== References == {{Reflist}} * {{citation | publisher = The Open Group | url = http://www.opengroup.org/onlinepubs/007908799/xcu/strip.html | contribution = strip | title = The Single UNIX Specification, Version 2 | date = 1997}}
== External links == {{Wikibooks|Guide to Unix|Commands}} * {{man|cu|strip|SUS}} * {{man|1|strip|Plan 9}}
{{Unix commands}} {{Plan 9 commands}}
Category:Unix programming tools Category:Unix SUS2008 utilities Category:Plan 9 commands