BASH Frequently Asked Questions

Note: The FAQ was split into individual pages for easier editing. Just click the 'Edit' link at the bottom of each entry, and please don't add new ones to this page; create a new page with the entry number instead.BRThank you.

These are answers to frequently asked questions on channel #bash on the [ freenode] IRC network. These answers are contributed by the regular members of the channel (originally heiner, and then others including greycat and r00t), and by users like you. If you find something inaccurate or simply misspelled, please feel free to correct it!

All the information here is presented without any warranty or guarantee of accuracy. Use it at your own risk. When in doubt, please consult the man pages or the GNU info pages as the authoritative references.

[:BASH:] is a BourneShell compatible shell, which adds many new features to its ancestor. Most of them are available in the KornShell, too. The answers given in this FAQ may be slanted toward Bash, or they may be slanted toward the lowest common denominator Bourne shell, depending on who wrote the answer. In most cases, an effort is made to provide both a portable (Bourne) and an efficient (Bash, where appropriate) answer. If a question is not strictly shell specific, but rather related to Unix, it may be in the UnixFaq.

This FAQ assumes a certain level of familiarity with basic shell script syntax. If you're completely new to Bash or to the Bourne family of shells, you may wish to start with the (incomplete) BashGuide.

If you can't find the answer you're looking for here, try [:BashPitfalls:]. If you want to help, you can add new questions with answers here, or try to answer one of the BashOpenQuestions.

Chet Ramey's official [ Bash FAQ] contains many technical questions not covered here.


Include(BashFAQ/001, , editlink) Include(BashFAQ/002, , editlink) Include(BashFAQ/003, , editlink) Include(BashFAQ/004, , editlink) Include(BashFAQ/005, , editlink) Include(BashFAQ/006, , editlink) Include(BashFAQ/007, , editlink) Include(BashFAQ/008, , editlink) Include(BashFAQ/009, , editlink) Include(BashFAQ/010, , editlink) Include(BashFAQ/011, , editlink) Include(BashFAQ/012, , editlink) Include(BashFAQ/013, , editlink) Include(BashFAQ/014, , editlink) Include(BashFAQ/015, , editlink) Include(BashFAQ/016, , editlink) Include(BashFAQ/017, , editlink) Include(BashFAQ/018, , editlink) Include(BashFAQ/019, , editlink) Include(BashFAQ/020, , editlink) Include(BashFAQ/021, , editlink) Include(BashFAQ/022, , editlink) Include(BashFAQ/023, , editlink) Include(BashFAQ/024, , editlink) Include(BashFAQ/025, , editlink) Include(BashFAQ/026, , editlink) Include(BashFAQ/027, , editlink) Include(BashFAQ/028, , editlink) Include(BashFAQ/029, , editlink) Include(BashFAQ/030, , editlink) Include(BashFAQ/031, , editlink) Include(BashFAQ/032, , editlink) Include(BashFAQ/033, , editlink) Include(BashFAQ/034, , editlink) Include(BashFAQ/035, , editlink) Include(BashFAQ/036, , editlink) Include(BashFAQ/037, , editlink) Include(BashFAQ/038, , editlink) Include(BashFAQ/039, , editlink) Include(BashFAQ/040, , editlink) Include(BashFAQ/041, , editlink) Include(BashFAQ/042, , editlink) Include(BashFAQ/043, , editlink) Include(BashFAQ/044, , editlink) Include(BashFAQ/045, , editlink) Include(BashFAQ/046, , editlink) Include(BashFAQ/047, , editlink) Include(BashFAQ/048, , editlink) Include(BashFAQ/049, , editlink) Include(BashFAQ/050, , editlink) Include(BashFAQ/051, , editlink) Include(BashFAQ/052, , editlink) Include(BashFAQ/053, , editlink) Include(BashFAQ/054, , editlink) Include(BashFAQ/055, , editlink) Include(BashFAQ/056, , editlink) Include(BashFAQ/057, , editlink) Include(BashFAQ/058, , editlink) Include(BashFAQ/059, , editlink) Include(BashFAQ/060, , editlink) Include(BashFAQ/061, , editlink) Include(BashFAQ/062, , editlink) Include(BashFAQ/063, , editlink) Include(BashFAQ/064, , editlink) Include(BashFAQ/065, , editlink) Include(BashFAQ/066, , editlink) Include(BashFAQ/067, , editlink) Include(BashFAQ/068, , editlink) Include(BashFAQ/069, , editlink) Include(BashFAQ/070, , editlink) Include(BashFAQ/071, , editlink) Include(BashFAQ/072, , editlink) Include(BashFAQ/073, , editlink) Include(BashFAQ/074, , editlink) Include(BashFAQ/075, , editlink) Include(BashFAQ/076, , editlink) Include(BashFAQ/077, , editlink) Include(BashFAQ/078, , editlink) Include(BashFAQ/079, , editlink) Include(BashFAQ/080, , editlink) Include(BashFAQ/081, , editlink) Include(BashFAQ/082, , editlink) Include(BashFAQ/083, , editlink) Include(BashFAQ/084, , editlink) Include(BashFAQ/085, , editlink) Include(BashFAQ/086, , editlink) Include(BashFAQ/087, , editlink) Include(BashFAQ/088, , editlink) Include(BashFAQ/089, , editlink) Include(BashFAQ/090, , editlink) Include(BashFAQ/091, , editlink) Include(BashFAQ/092, , editlink) Include(BashFAQ/093, , editlink) Include(BashFAQ/094, , editlink) Include(BashFAQ/095, , editlink) Include(BashFAQ/096, , editlink) Include(BashFAQ/097, , editlink) Include(BashFAQ/098, , editlink) Include(BashFAQ/099, , editlink) Include(BashFAQ/100, , editlink)