Safely reboot a Linux server?
Answer: Use the following command:
shutdown -r now
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Safely reboot a Linux server?
Answer: Use the following command:
shutdown -r now
Find out the CPU model in Linux
Answer:
You can find the CPU information at /proc/cpuinfo
# grep "model name" /proc/cpuinfo
model name : Intel(R) Core(TM)2 Quad CPU Q9400 @ 2.66GHz
A better alternative to top
Answer:
It is the htop : http://htop.sourceforge.net
To install under Ubuntu
# sudo apt-get install htop
How to enable / disable service during startup in Fedora?
Answer:
Firstly, check if the service can be managed by chkconfig, e.g. Apache httpd
# chkconfig --list httpd
httpd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
To disable the service during normal startup, use
# chkconfig httpd off
To re-enable it, use
# chkconfig httpd on --level 3,4,5
Mount a USB drive in Ubuntu using command
Answer:
Ubuntu Desktop will auto discover the USB drive when you connect to the computer. However, if you are using server with only access to the shell, you can still mount it manually.
1. Find out the correct device using the fdisk command. Pay attention to the disk space so you can recognize the correct device easily, e.g. /dev/sdb1
# sudo fdisk -l
2. Create a mount folder
# sudo mkdir /mnt/usb1
3. Finally, mount it
# sudo mount /dev/sdb1 /mnt/usb1
Now you can put files into this folder (/mnt/usb1) and it will be saved in your USB drive.