Logout from the Linux system
Answer:
To logout from the Linux console, use the logout command.
# logout
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Logout from the Linux system
Answer:
To logout from the Linux console, use the logout command.
# logout
Setup default system timezone in Linux
Answer:
To setup the default system timezone in Linux.
1. Check what timezones are available in your system
# ls /usr/share/zoneinfo/
...
Australia Canada EST ..
..
2. From the list above, pick one you want to set, e.g. Canada
# sudo ln -sf /usr/share/zoneinfo/Canada /etc/localtime
That's all.
Running a command on the remote server
Answer:
To run a command on the remote server over ssh, use the following command:
# ssh username@server COMMAND
Add an existing user to an existing group
Answer:
Add an existing user to an existing group (supplemental group)
# sudo usermod -a -G www-data john
john will be added to the www-data group
Ignoring the program's output
Answer:
Sometimes, you want to throw away the standard output (stdout) from a particular program/command, you can redirect the stdout the the /dev/null
cat test.txt > /dev/null