They have been charged with offences under the Terrorism Act 2000.
The men, who are of North African origin, made no plea or declaration and were remanded in custody.
During an hour-long hearing, which was translated into Arabic, the men were charged with an alleged contravention of Section 57 of the Act.
Men named
The section states: "A person commits an offence if he possesses an article in circumstances which give rise to a reasonable suspicion that his possession is for a purpose connected with the commission, preparation or instigation of an act of terrorism".
They are expected to appear again next Tuesday.
The men were named as Abdellah Abdelhafid, 33, of Burnham Way, West Ealing, London; Mourad Idir Abes, 27, of Ridgefield Road, Cowley, Oxford; Ghalem Belhadj, 36, Kilmarnock prison; Karim Benamghar, 31, of Albion Road, Edinburgh.
Salah Moullef, 32, of Albion Road, Edinburgh; Hakim Ziem, 31, of Easter Road, Edinburgh and Sofiane Lahamar Hassim Ziem, 29, of Burnham Way, West Ealing, London.
It is expected they will be held at a number of different locations in Scotland.