Method and device for transmitting synchronization signal for d2d (device to device) communication in wireless communication system

The present invention relates to a method of detecting a synchronization signal for D2D (device to device) communication of a terminal in a wireless communication system. More particularly, the method includes detecting a first synchronization signal and a second synchronization signal on a specific sub-frame for a synchronization signal period set for D2D communication, wherein the first synchronization signal is generated based on a first of predefined sets of root indexes, the second synchronization signal is generated based on a second of predefined sets of root indexes, and the first set of root indexes and the second set of root indexes are made up of different indexes.