Linux, or GNU/Linux, is a widely used open-source operating system built on the Linux kernel that is available for anyone to use, known for its security and privacy advantages. With advancements in information technology, protecting privacy has become increasingly challenging due to data extraction practices done by major tech companies. This has encouraged some Mastodon users to switch to Linux, with many expressing their opinions on using Linux as their main operating system. This research seeks to analyze the sentiments of Mastodon users toward Linux through sentiment analysis to understand whether the trend is predominantly positive, negative, or neutral. The methodology used includes collecting data with the help of the Mastodon.py library witch then gets manually labelled with the assistance of a linguistic expert as well as a linguistic rule proposed by previous research. The text mining process includes preprocessing steps which includes feature extraction with n-Gram to gain the most optimize result as well as employing feature selection using TF-IDF. The Naïve Bayes algorithm is employed for text classification. The entire process of data analysis is conducted with the help of AI Studio (RapidMiner) software. The results show that the highest-performing model for sentiment analysis is achieved with an n-gram value of 3, revealing user sentiment polarity towards Linux on Mastodon as follows: 42% positive, 28% negative, and 30% neutral. The sentiment analysis model has an accuracy of 63%, with a precision of 70%, recall of 80%, and an f1-score of 74% which shows that this method is able to optimize the sentiment analysis process.