In the UK: Assuming that no job hunting or application has been done during work hours, can I be fired for openly job hunting out of hours?
What if I advertise my availability on a site like LinkedIn?
In Great Britain Employees have two types of protections: contractual and statutory.
It would be in breach of contract ("wrongful dismissal") for an employer to dismiss without notice for job hunting but contractually there is nothing to stop an employer dismissing for any reason if they give the notice required (which may be only a week or two, say).
Statutory protection may, however, prevent "unfair dismissal" but this generally only applies if someone has been employed for at least two years. There are some exceptions - e.g. dismissal as an act of religious/racial/sex discrimination etc. is prohibited even if the employee has less than 2 years service but these exceptions do not include job-hunting.
So someone who has been employed for less than 2 years could be dismissed with notice for job hunting.
There are also contractual and statutory protections in Northern Ireland. The contractual ones are the same as in the rest of the UK but some of the details of the statutory protections are different from GB.
Legally not. And it doesn't make much sense to a normal employer, because either way the result is that you're leaving the company.
But ask on workplace.stackexchange.com. The employer can quite obviously fire you illegally, which means you have to put in effort in court to prove this and get compensation. The employer can find a legal reason to fire you. Maybe, just by coincidence, they figure out that your department doesn't have enough work, and someone should be laid off, and just by coincidence, the person laid off is you. That may be a good reason, or it may not. So again, you could meet them in court.
So depending on the employer, I would not do this openly. On the positive side, if you find a new job and give notice, your employer will find it very hard to fire you with a shorter notice, and you will likely win in a court. Plus, often you can start a new job earlier. And most employers don't check your LinkedIn account regularly.