<PAGE>

                                                                    Exhibit 10.8

                              AMENDED AND RESTATED
                                    AGREEMENT


         THIS AMENDED AND RESTATED AGREEMENT, made as of the 21st day of October
1999, by and between ROBERT F. YOUNG, NANCY R. YOUNG and MARC EWING
(individually and collectively, the "Founders"); DONALD J. BARNES ("Employee,"
and collectively with the Founders, the "Individual Parties"); and RED HAT,
INC., a Delaware corporation with offices in Durham, North Carolina (the
"Corporation");

                              W I T N E S S E T H:

         WHEREAS, Employee was granted warrants (the "Warrants") to purchase
1,100,000 (split adjusted) shares of the Corporation's common stock pursuant to
an Employment Agreement by and between the Corporation and Employee commencing
May 1, 1995 and executed October 10, 1995 (the "Employment Agreement"); and

         WHEREAS, the Individual Parties entered into an Agreement (the
"Original Agreement") binding Employee and the Corporation to its terms with
respect to the Warrants and for any and all shares of the Corporation issued to
Employee upon exercise of the Warrants (the "Warrant Shares"); and

         WHEREAS, the Individual Parties amended the Original Agreement on May
24, 1999 to modify the terms of the Original Agreement and to extend the term of
the Warrants, and pursuant to such amendment, certain sections of the Original
Agreement were terminated as of the consummation of the Corporation's initial
public offering on August 16, 1999; and

         WHEREAS, as of the date hereof, the Employee has partially exercised
the Warrants for Warrant Shares and all of the remaining Warrant Shares are
fully and immediately exercisable; and

         WHEREAS, the Individual Parties and the Corporation desire to amend and
restate the terms and conditions upon which the Warrants may be exercised and
terminated and the terms and conditions under which the Warrant Shares will be
held; and

         WHEREAS, the Individual Parties and the Corporation agree that it is in
their best interest to agree upon the terms and conditions set forth herein and
that such terms and conditions reflect the full understanding of the Individual
Parties and the Corporation.

         NOW, THEREFORE, in consideration of the premises and of the mutual
covenants and conditions herein contained, the Individual Parties and the
Corporation agree, for themselves, their successors and assigns, as follows:

<PAGE>


                                      -2-


                                    ARTICLE I
                                    WARRANTS

         1.1 WARRANT. The Corporation and the Employee hereby agree that the
Employee's rights to purchase Warrant Shares pursuant to the Employment
Agreement, and the exercise of the Warrants, shall be governed by the terms of
this Article I. Employee agrees that the provisions in this Agreement pertaining
to the exercise and termination of Warrants and the purchase of Warrant Shares
represents the understanding of the parties and shall control and shall
supersede over any provisions to the contrary in such Employee's Employment
Agreement. Employee acknowledges that the only options or warrants to purchase
or receive shares of the Corporation's stock to which the Employee is entitled
are the Warrants described in this Article I, that as of the date of the
Employment Agreement no profit sharing plan had been implemented by the
Corporation, and that the Employee waives any rights under Section 3c of the
Employment Agreement to demand "warrants" pursuant to a profit sharing plan
unless a profit sharing plan expressly granting the right to Employee to
"warrants" is hereinafter implemented by the Corporation and authorized by its
Board of Directors.

         1.2 EXERCISE. Unless this Warrant is earlier terminated pursuant to
Section 1.5 hereof, Employee has the option to purchase the number of Warrant
Shares set forth on SCHEDULE A hereto (the "Remaining Warrant Shares"). The
Employee may exercise the Warrants for all or any portion of the Remaining
Warrant Shares at any time; provided that no partial exercise of such Warrant
may be for less than one hundred (100) full Warrant Shares. In no event shall
the Corporation be required to transfer fractional shares to the Employee. The
Individual Parties and the Corporation acknowledge and confirm that as of the
date hereof, the Employee has exercised 380,000 of his Warrants. Upon the
exercise of any Warrants hereunder, Schedule A shall be automatically amended
and restated to reduce the Remaining Warrant Shares appropriately.

         1.3 PURCHASE PRICE. The purchase price for each Warrant Share shall be
$.0001 per Warrant Share.

         1.4 EXERCISE OF WARRANTS. The respective number of Warrants shall be
exercisable from time to time by giving ten (10) days prior written notice to
the Corporation and the payment in cash to the Corporation of the purchase price
of the Warrant Shares which the Employee may and elects to purchase. The
Corporation shall make immediate delivery of such Warrant Shares, provided that
if any law or regulation requires the Corporation to take any action with
respect to the Warrant Shares specified in such notice before the issuance
thereof, the date of delivery of such Warrant Shares shall be extended for the
period necessary to take such action.

         1.5 TERMINATION OF WARRANTS. The Warrants, to the extent not heretofore
exercised, shall terminate on the first to occur of the following dates:

             (a) If the Employee's employment with the Corporation terminates
because of his death, any Warrants held by the Employee on the date of his death
may be exercised only within thirty (30) days after his death and only to the
extent that the Warrants could have been exercised immediately before the
Employee's death;

<PAGE>


                                      -3-


             (b) If the Employee's employment with the Corporation terminates
because of Total Disability (as hereinafter defined) after at least one (1) year
of continuous employment with the Corporation immediately following the date on
which Warrants were originally granted in the Employment Agreement, the Employee
may exercise the Warrant to the extent that it could be exercised upon such
termination of employment at any time within thirty (30) days after the
employment shall terminate;

             (c) If the Employee's employment with the Corporation terminates
because of his retirement after at least one (1) year of continuous employment
with the Corporation immediately following the date on which the Warrants were
granted, the Employee may exercise the Warrant to the extent that the Warrants
can be exercised upon such termination of employment at any time within thirty
(30) days after retirement. Retirement means retirement from the Corporation
pursuant to the provisions of the Corporation's policy as may be implemented by
the Board of Directors from time to time.;

             (d) If the Employee's employment with the Corporation is terminated
by the Corporation without cause, the Employee may exercise the Warrants to the
extent that the Warrants can be exercised upon such termination of employment at
any time within thirty (30) days after such termination;

             (e) Termination of the Employee's employment with the Corporation
for any reason other than death, disability, retirement, or without cause;

             (f) The happening of any event resulting in the termination of this
Agreement pursuant to Section 3.14 hereof;

             (g) May 1, 2006.

         1.6 RIGHTS PRIOR TO EXERCISE OF WARRANT. The Warrants granted to the
Employee are nontransferable by the Employee and are exercisable only by the
Employee. The Employee shall have no right as a shareholder with respect to the
Warrant Shares until payment of the purchase price per Warrant Share set forth
in Section 1.3 and delivery to the Employee of such Warrant Shares as herein
provided.

         1.7 RESTRICTIONS. All Warrant Shares acquired by Employee pursuant to
the Warrants shall be subject to the applicable securities laws restrictions on
transfer.

         1.8 TIME IS OF THE ESSENCE. Time is of the essence in exercising the
Warrants under this Agreement.

<PAGE>


                                      -4-


                                   ARTICLE II
                               GENERAL PROVISIONS

         2.1 CORPORATE ACTION. The Corporation and the Individual Parties shall
take all action required pursuant to this Agreement to effectuate the provisions
herein.

         2.2 WARRANT SHARES. All references to Warrant Shares and Remaining
Warrant Shares shall be automatically adjusted with respect to any stock split,
stock dividend, combination, recapitalization, reorganization or any other
transaction or event that would otherwise have an effect on the Corporation's
Common Stock.

         2.3 NECESSARY ACTS. Each party hereto agrees that they will do any act
or thing and will execute any and all instruments necessary and/or proper to
make effective the provisions of this Agreement.

         2.4 SEVERABILITY. Should any provision of this Agreement be declared to
be invalid for any reason or to have ceased to be binding on the parties hereto,
such provision shall be severed, and all other provisions herein shall continue
to be effective and binding.

         2.5 GOVERNING LAW. This Agreement shall be subject to and governed by
the laws of the State of Delaware.

         2.6 ENTIRE AGREEMENT. This Agreement together with Schedule A, as such
may be amended and restated from time to time, contains the entire agreement
between the parties hereto with respect to the subject matter hereof, and no
change, amendment or modification of this Agreement shall be valid unless the
same be in writing and signed by the Employee and the Corporation. No waiver of
any of the terms of this Agreement shall be valid unless signed by the party
against whom such waiver is asserted. This Agreement supersedes and nullifies
the terms of the Original Agreement and any other agreement setting forth the
rights of the Employee previously entered into by Employee with respect to the
subject matter hereof. The Employee acknowledges that his ownership of Warrants
gives him no rights or expectations except those embodied in this Agreement.

         2.7 SPECIFIC PERFORMANCE. The parties acknowledge that the actual
damage which would be sustained upon the breach of this Agreement by any of the
parties or to a personal representative of a Decedent aggrieved by the breach or
threatened breach of any of its provisions shall be entitled to seek from any
court of competent jurisdiction an order for specific performance of all of the
terms and conditions of this agreement. This provision does not limit the
parties from seeking any other available remedies at law or equity.

         2.8 PROHIBITED TRANSFERS VOID. Any purported transfer in violation of
this Agreement shall be void and shall not transfer any interest or title to the
purported transferee. The Corporation shall not be required to transfer on its
books any Warrant or Warrant Shares sold or transferred in violation of any of
the provisions set forth in this Agreement or to treat as owner of this Warrant
or those Warrant Shares or to pay dividends to any transferee to whom any of
those Warrant Shares shall have been so sold or transferred.

<PAGE>


                                      -5-


         2.9 REPRESENTATION AS TO ATTORNEY. The Individual Parties (and the
Corporation) acknowledge that a conflict may exist among their respective
interests, and that the Individual Parties should seek the advice of independent
counsel. The parties hereby waive any claim they may have as to any conflict
which may exist in connection with the preparation of this Agreement.

         2.10 AGREEMENT BINDING. This Agreement shall insure to the benefit of
and be binding upon the parties hereto and their respective next-of-kin,
legatees, administrators, executors, legal representatives, successors and
permitted assigns (including remote, as well as immediate, successors to and
assignees of said parties).

         2.11 PRONOUNS AND HEADINGS. In this Agreement the masculine shall
include the feminine and the singular shall include the plural as the context of
this Agreement shall clearly require. The article and section headings in this
Agreement are inserted for convenience only and are not part of the Agreement.

         2.12. TERMINATION. This Agreement shall commence as of the date hereof
and shall continue in full force and effect until terminated (i) by the mutual
agreement of the parties hereto, (ii) by the dissolution or bankruptcy of the
Corporation, (iii) upon the effectiveness of a merger, consolidation or other
acquisition of substantially all of the Corporation's assets, if the Corporation
is not the surviving corporation, except that a merger or consolidation with a
subsidiary which effects a mere change in the form or domicile of the
Corporation without changing the respective shareholdings of the Individual
Parties shall not terminate the agreement, even if the Corporation is not the
surviving corporation, or (iv) upon the sale of all of the issued and
outstanding shares of the Corporation.

         2.13 TRANSFERABILITY. Any rights or interests of the parties set forth
in this Agreement are personal and nontransferable.

         2.14 NOTICES. Any notice or offer required hereunder shall be deemed to
have been validly given if delivered by certified mail, return receipt
requested, postage prepaid, addressed, or by federal express overnight delivery
(or other nationally recognized service) with receipt confirmed, in the case of
the Corporation, to its principal office, and in the case of the Individual
Parties, to their address appearing on the stock records of the Corporation or
to such other address as he may designate. Notices hereunder shall be deemed
given seven (7) business days after deposit in the United States Mail or the
next business day, if delivered by Federal Express overnight delivery (or other
nationally recognized service).

         2.15 JURISDICTION AND VENUE. The parties agree that any action brought
in any court whether federal or state shall be brought within the State of North
Carolina in the judicial district of Durham, Durham County and do hereby waive
all questions of personal jurisdiction or venue for the purpose of carrying out
this provision.

         2.16 COUNTERPARTS. This Agreement may be executed in one or more
counterparts, each of which will be deemed to be an original copy of this
Agreement and all of which, when taken together, will be deemed to constitute
one and the same agreements.


<PAGE>


                                      -6-


         IN WITNESS WHEREOF, the Corporation has caused this Amended and
Restated Agreement to be signed by its duly authorized officers, and the
Individual Parties have hereunto set their hands, all as of the day and year
first above written.

                                     RED HAT, INC.


                                     By: /s/ Robert F. Young
                                         -------------------
                                     Title: Chief Executive Officer


                                     /s/ Robert F. Young
                                     ------------------------------
                                     Robert F. Young


                                     /s/ Nancy R. Young
                                     ------------------------------
                                     Nancy R. Young


                                     /s/ Marc Ewing
                                     ------------------------------
                                     Marc Ewing

                                     EMPLOYEE


                                     /s/ Donald J. Barnes
                                     ------------------------------
                                     Donald J. Barnes


<PAGE>


                                      -7-


                                   SCHEDULE A

<TABLE>

<S>                                                           <C>
Remaining Warrant Shares                                      720,000

</TABLE>