Learning notes-2014-07-07 Linux common commands

Source: Internet
Author: User
Tags local time set time linux mint

2014-07-07 Linux Common commands

Read some articles on linuxtoy.org collect some common commands
==================
First, PS, kill use for reference
Second, the Ubuntu tips three
Third, minimize the installation of Ubuntu
Four, Linux Mint set time

One to Sunline see linuxtoy.org website

===================
First, PS, kill use for reference

Ps-viewing the currently running process, example: $ ps
Kill {pid}-through PID to stop any process, example: $ kill 1012
Killall {process-name}-stops any process by name, example: $ killall httpd
ps-ag-get information about all running processes, example: $ ps-ag
Kill 0-Stop all processes (except your shell), example: $ kill 0
Linux-command &-Background execution Process, example: $ ls/r | Wc-l &
PS Aux-shows the owner of the process, example: $ ps aux
PS Ax | grep process-u-want-to see-View a specific process, example: PS Ax | grep httpd
top-View currently running processes, memory, and CPU utilization, example: $ top
---------------------------------------

Second, the Ubuntu tips three

Get version information for Ubuntu:
Cat/etc/issue-learned about Ubuntu version number
uname-r-Learn about the Linux kernel version used
Check the performance status:
Cat/proc/meminfo-provides information on memory consumption
Use root mode:
Sudo-s-h-as root user switch to root mode
sudo-s-switch to root mode, but still for the current user
-----------------------------------------------------
Third, minimize the installation of Ubuntu

Source: https://linuxtoy.org/archives/minimalist-install-of-ubuntu.html Toy
The default installation method for Ubuntu may not be acceptable to all users. For example, some users do not want to use the GNOME desktop environment, and some users do not need to install all the software beforehand. To solve the above-mentioned problems, it may be a better compromise to perform a customized installation based on the preferences of the minimal Ubuntu installation.

One thing to determine before installing is how to select the installation CD. Depending on the requirements of this article, it is more appropriate to download the Alternate install CD. For ease of installation, the downloaded ISO file should be burned to a CD.

First, install the Ubuntu basic system. In Ubuntu 6.10, for example, when the installation disk is inserted, the computer boots the system from the CD-ROM, then select "Install a command-line system" in the initial installation menu, then the general installation process is not two.

After the basic system installation is complete, you will be asked to reboot the system and log in using the account number and password set during Setup.

Now, execute the instruction sudo vim/etc/apt/sources.list in order to edit the Sources.list file. After VIM opens the file, remove the note symbol (#) that is included with the Deb http:/or DEB-SRC/HTTP. Then save the changes you made.

In order to complete the subsequent installation process, the instructions sudo apt-get update will need to be executed.

At this point, the minimized Ubuntu installation is ready.

If you need to install a desktop environment, you can also perform the following choices:

Install X Window System: sudo apt-get install X-window-system-core.
Install Login Manager: sudo apt-get install xdm/gdm/kdm[note]. The most common graphical login manager includes XDM, GDM, KDM, and users can choose one of them according to their needs.
Install the Desktop Environment or window Manager: sudo apt-get install ubuntu-desktop/kubuntu-desktop/xubuntu-desktop. This will install the GNOME, KDE, XFCE desktop environments separately. For desktop environments such as GNOME, KDE, XFCE, for better customization, you can install only the most basic components, such as the sudo apt-get install Gnome-core/kde-core/xfce4. Of course, if you don't need a desktop environment, you can choose to install the window manager instead. In that case, you can execute the instruction sudo apt-get install FLUXBOX/ICEWM/ENLIGHTENMENT/FVWM.
Installation software: sudo apt-get install Firefox/gaim/xmms. This installs the Firefox browser, the Gaim chat program, and the XMMS music player. Again, you don't have to stick to the examples here, you can install them exactly as you like.

Once the installation of the above process has been completed, the system will be restarted and a completely free system would be enjoyed.

Comments

A notation like XDM/GDM/KDM requires the reader to choose one of them to execute the command without error.
Description: Install Login Manager: sudo apt-get install xdm/gdm/kdm[note]. The most common graphical login manager includes XDM, GDM, KDM, and users can choose one of them according to their needs.

My choice is KDM. hehe.
-------------------------
Four, Linux Mint set time
Linux uses world time (GMT) and local time (locally). World Time is GMT, local time is the difference between the user's time zone and international time. Linux is the same as Windows when the BIOS time is loaded on each boot, and the time is written back on exit Bios;linux is different from Windows when Linux takes World time (UTC) as the BIOS time, local time Is the difference between the user's time zone and international time, while Windows directly takes the local time as the BIOS time. This different time mechanism in a multi-OS environment will cause the time to be displayed incorrectly.
Workaround: Edit the file/etc/default/rcs change the Utc=yes to Utc=no, and then set the correct local time.

Time modification
Date month day year. seconds
Date-s can set the system time directly

For example, the command to set the system time to June 10, 1996 is as follows.
#date-S 06/10/96
The command to set the system time to 1:12 P.M. 0 seconds is as follows.
#date-S 13:12:00
Note that this is the system time and Linux is maintained by the operating system.
When the system starts, the Linux operating system reads the time from the CMOS into the system time variable, and the later modification time is realized by modifying the system time. To keep the system time consistent with the CMOS time, Linux writes the system time to CMOS at every time. Since this synchronization takes place at intervals (about 11 minutes), if the machine is re-started immediately after we execute the DATE-S, the modification time may not be written to the CMOS, which is the cause of the problem. You can execute the following command if you want to make sure that the changes take effect.
#clock-W
This command forces the system time to be written to the CMOS
From: http://www.2cto.com/os/201109/103909.html
-----------------------------


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.