Let $X$ be an infinite set and let $\text{End}(X)$ be the set of all functions $f:X\to X$. For $f\in\text{End}(X)$ let $$\text{Com}(f) = \{g\in\text{End}(X): g\circ f = f \circ g\}.$$
Is there $f\in \text{End}(X)$ such that $\text{Com}(f) = \{\text{id}\_X, f\}$? 


If not, what is $\min\{|\text{Com}(f)|:f\in\text{End}(X)\}$, in terms of $|X|$?



Functions $f:X\to X$ that commute with "almost no others"
Nope: since $f^2$ commutes with $f$, we should have either $f^2=\mathrm{id}\_X$ or $f^2=f$, that is $f$ is either idempotent or involutive. But on an infinite set it is easy to see these always have infinite commutators.


