Linear regression assumes that there is approximately a linear relationship between a predictor variable $X$ and a quantitative response $Y$. Mathematically, we can write this linear relationship as
$Y ≈ β_0 + β_1X$.
In many situations, the response variable $Y$ is instead qualitative (e.g. categorical). Predicting a qualitative response for an can be referred to as classifying. Logistic regression is one of classifiers. Logistic regression models the probability that $Y$ belongs to a particular category.
Mathematically, we can write logistic relationship as
$P(X) ≈ β_0 + β_1X$.
In both cases $X$ is liner variable.
See for details An Introduction to Statistical Learning with Applications in R by G. James, D. Witten, T. Hastie and R. Tibshirani