Home > Article > Computer Tutorials > How to let all users print specified prompt information when logging in in Linux
In the Linux system, through configuration files and scripts, you can display the specified prompt information when all users log in. Next, we will introduce several commonly used implementation methods.
sudo vi /etc/issue
Welcome to My Linux System! Please be aware that all activities are monitored.
Now, when the user logs in, the system will display the prompt information added in the /etc/issue file.
sudo vi /etc/profile
echo "Welcome to My Linux System!" echo "Please be aware that all activities are monitored."
Now, when the user logs in, the system will execute the code added in the /etc/profile file and display the corresponding prompt information.
sudo vi /etc/update-motd.d/99-custom-message
#!/bin/sh echo "Welcome to My Linux System!" echo "Please be aware that all activities are monitored."
sudo chmod +x /etc/update-motd.d/99-custom-message
Now, when the user logs in, the system will execute the /etc/update-motd.d/99-custom-message script and display the corresponding prompt information.
sudo vi /etc/motd
Welcome to My Linux System! Please be aware that all activities are monitored.
Now, when the user logs in, the system will display the prompt information added in the /etc/motd file.
The above is the detailed content of How to let all users print specified prompt information when logging in in Linux. For more information, please follow other related articles on the PHP Chinese website!