Alarm clock: How To Set Timeout For A Shell Command in Categories BASH Shell, CentOS, Debian / Ubuntu, GNU C / C++, Korn Shell Scripting, Linux, Programming, RedHat and Friends, Solaris-Unix, Suse, Ubuntu Linux, UNIX last updated September 26, 2008Q. How can I run a command called foo, and have it timeout / abort after 10 seconds under GNU/Linux running bash shell or script? How do I run command under an alarm clock?