Can 2S (i.e. general compartment) tickets be booked online for trains in India?
2S (Second sitting) Class can be booked online using irctc.com, but 2S is not same as General Compartment.
2S stands for Second Sitting, it is a reserved class and your ticket will have your seat number, it is not the same as General Compartment which is Unreserved Class (UR).
General compartment ticket cannot be booked online and can only be obtained from the Station directly and sometimes available only from few hours before departure till the actual departure as it doesn't have any Seat reserved.
No. General compartment tickets can only be bought at the local railway station. Although there is no information which specifically suggests this in the Indian rail booking portals web site https://www.irctc.co.in/beta_htmls/term_src.html#Q1, but if one goes on to the website and tries to buy a general compartment ticket, there is no option to do so. This answer here may also give more insight.
This answer is wrong. vivek_bye's answer is the correct one. 2S is not same as UR and it can be booked online
@SouravGhosh Why do you say the answer is wrong ? The *answer* is correct to the question asked wrt General compartment tickets. I never said 2S cannot be booked online. May be you meant to propose an edit to the question ?
Sorry. I only noticed '2S' in the question. I overlooked 'General compartment' part. Yes. I also think that the question needs to be edited because 2S is not the general compartment. :) But editing is not the right judgement too because we don't know what the OP actually meant. (2S/General Compartment) :D