Linlithgow is only 11 miles/18 km from Edinburgh International Airport .
By far the easiest option is to take the newly opened tram from the Airport to Edinburgh Park Train Station (about 10 minutes) and then change there for a train to Linlithgow. This costs around £9 for an adult with an all inclusive ticket and the whole journey takes around 30 minutes (allow extra time late evening or early morning for reduced train services).
There are no direct public transport links to Linlithgow from Edinburgh airport, however a dedicated airport bus service, Airlink Express , service 100, runs from outside the terminal building to Edinburgh city center (Waverley Bridge) Adult fares are £3.50 for a single, £6 for an open return and the journey takes an average 25 mins, tickets can be purchased from the kiosk at the bus stop. Once in Edinburgh city centre, there are direct bus and train links to Linlithgow.
Although there is no direct bus from the terminal, the number 38 which operates between Edinburgh-Linlithgow-Falkirk-Stirling does stop near the airport. Passengers must walk from the terminal towards the Hilton hotel, then continue on out of the airport complex, past a secure car park service, continue under the motorway bridge and then up some stairs and on to the motorway bus stop. This walk takes about 10-15 minutes and is not suitable if you have a lot of luggage, are disabled or a large group of people. There is a chance a taxi may run you there in a few minutes. The service is fairly regular (timetable  - add/subtract about 5 minutes to/from ratho station for airport times) and runs from early morning until late at night and fares are very reasonble. Journey time to Linlithgow is about 45 minutes, although if using the bus to get TO the airport allow a lot of time for delays, especially in the mornings and other buys periods. It may be worth getting the service before the one you think will allow you extra time just to be sure!
At night/early morning the service may start or terminate at Linlithgow Cross, but for most of the day it will run through the main street of the town and out towards Falkirk.
Another option is to take the local 35 Bus from The airport to Edinburgh Park train station and then take the train from there to Linlithgow. Almost every train bound for Glasgow, (And every train bound for Dunblane or Sitrling) which stops at Edinburgh Park station will also stop at Linlithgow. The journey from Edinburgh Park to Linlithgow is non stop and takes around around 15 minutes.
Linlithgow is conveniently placed on the Central Scotland line, therefore benefits from regular trains to and from Edinburgh, Falkirk, Glasgow and Stirling. Trains to and from Linlithgow (LIN) station are operated by First Scotrail . The station only has two platforms, Platform 1 for eastbound trains and Platform 2 for westward trains. Trains to and from Edinburgh take approximately 20 minutes and run every 15 minutes at peak times. Glasgow and Stirling trains take approximately 30 minutes and run twice per hour at peak times. Complete station information as well as journey planers can be found on the National Rail Enquiries website  or from First Scotrail 
FirstGroup operate a bus route from Stirling to Edinburgh which goes via Linlithgow, service number 38, making it possible to get into Linlithgow from either Stirling or Edinburgh. There is also a late night bus service which operates on Friday and Saturdays, which runs from Edinburgh to Linlithgow, service number 44N. Timetables are available online from the FirstGroup website 
Linlithgow is small enough to walk around. FirstGroup operate the 'Town Service' bus number L1, which loops round the town via the residential areas of Springfield, Braehead, Listloaning and Linlithgow Bridge. As it's a very small town, you won't find taxis available for hire (even outside the train station) and will need to call to arrange a pick-up in advance - but they can usually get to you in about 10 minutes. A search for "Linlithgow Taxis" will give you a few phone numbers, or just ask at a pub.
Linlithgow high street is home to many small traditional independent shops and businesses. There are 2 main supermarkets at either end of the town, Tesco in the regent centre and Sainsburys (open 8am-10pm Mon-Sat and 8am-8pm Sunday) in Linlithgow bridge. Unusually for a town of Linlithgow's size, there is a small retail park in Linlithgow bridge which contains some large shops such as Homebase, Argos, Au Naturale and Aldi. Opposite the retail park is the towns only petrol filling station, Murco (24 hours, open every day)
There are 10 pubs dotted along Linlithgow High Street, most mainly cater for locals and some may seem a little rough around the edges. However it is not uncommon for tourists to visit The Star and Garter or The Four Marys. Most pubs stay open until 11PM to 1AM, depending on the day of the week and how busy they are. Don't miss The four Marys Cask Ale Festival which occurs twice a year on the last weekends in May and October.
There is only one nightclub in Linlithgow, Code which is open until 2AM on Saturday. Greg Milne once famously threatened to 'burn code to the ground' after being ejected for rowdy behaviour. Most of the locals in search of club life will head out to larger towns and cities such as Edinburgh, Bathgate and Livingston.
Bed and Breakfast Accommodation
Linlithgow is a small town in West Lothian and can therefore be considered fairly dangerous, particularly for tourists. There are no run down no-go areas like in bigger cities. However, knife crime directed at tourists has become somewhat of a local pastime in all areas of the town. Avalon Gardens, in the West of the town is home to the notorious local crime family, the Bennies, and should be avoided, particularly at night.