ubuntu common functions and commands collection (their collated, 2011 -01-04 updated)

2010-11-18  来源:本站原创  分类:OS  人气:207 

Blue font that new entrants
1.1, to open in ubuntu. TXT files, the Chinese appear garbled, the solution:
Input terminal gconf-editor bring up the gconf-edit
PS: you can enter gconf-editor, not the front plus Sudo
Followed by opening the
apps-> gedit-2-> preferences-> encodings in the auto-detected
In the double-click pop-up dialog box to add GB18030, GBK, GB2312, then GB18030, GB2312 moved to the top, you can

1.2, are now installed in Ubuntu by default Openoffice.org, a system for office and win one of their word processing tool. We just txt file right click and select open with Openoffice.org on the line,
Openoffice.org when opening the file will pop up an ASCII character set conversion options in selecting a beginning in Simplified Chinese on it, such as Simplified Chinese (GB-18030) can be ----------- -------------------------------------
2, ubuntu how to open chm file formats:
Was established in the new search and install chmsee, you can -------------------------------------- ----------
3, SVN installation

1) directly through the Synaptic search
pysvn workbench
Will check out one called svn-workbench, this is, 37M or so, after security in the application - Programming - svn-workbench

2) If you have the subversion and subversion-tools SVN does both of these two is the need to use the specific command command query google
Terminal: svn help
svn co Export
svn ci
svn diff
svn st
Found on the Internet that is commonly used, but not verified

3) but also one is kdesvn
But this is another system called kde with ubuntu Bryan, then there may be problems, so I do not recommend the use of ubuntu --------------------- ---------------------------
4, installation of MySql

Terminal input sudo apt-get install mysql-server
However, attention must first turn off the Synaptic, or will say what kind of lock you can use Synaptic to remove the mysql, mysql-client 5.1 to delete it automatically will go to match the rest of the two, mysql-client-5.1 mysql-server mysql-server-5.1

Then security, then you can direct security mysql-server, it will automatically go to match the

In addition to these three files, two files need to display mysql
After installation, you can see in the application a "programming"
5, ubuntu does not show the desktop is the Recycle Bin, but you can simply set it on the desktop.
Use the shortcut Alt + F2 to open Run window.
Type gconf-editor, open the Gnome Configuration Editor.
Navigate to the apps \ nautilus \ desktop
To find the right option called trash_icon_visible, check mark, you can display the Recycle Bin.
Similarly, in home_icon_visible tick to show my documents; network_icon_visible check, display the Network Neighborhood; computer_icon_visible tick to show my computer.
6, tar.gz file to install
tar is the files into a package, not compressed;
. Gz is labeled with the gzip package. Tar file compressed, so into a. Tar.gz file.
Installed, first unpack, tar-zxvf xxx.tar.gz, it will generate a file folder named ----------------------- -------------------------
7, unzip rar format, just well ubuntu, this extract format is not supported by the terminal command sudo apt-get install rar unrar
Or search through Synaptic and install: unrar, rar
8, Ubuntu operating basic shortcuts
* Open the main menu = Alt + F1
* Run = Alt + F2
* Show Desktop = Ctrl + Alt + d
* Minimize the current window = Alt + F9
* Maximize the current window = Alt + F10
* Close the current window = Alt + F4
* Intercept fullscreen = Print Screen
* Intercept window = Alt + Print Screen
Default special shortcuts
* Show all the windows program = F10
* Shows the top of the current window procedure = F11
* Display the current window all programs = F12
* Switch windows = Alt + Tab
* Rotating 3D desktop = Ctrl + Alt + left / right arrow (you can also put the mouse on the title bar or the desktop using the scroll wheel to switch)
* Rotating 3D desktop (the active window to follow) = Ctrl + Shift + Alt + Left / Right Arrow
* Manually rotate the 3D desktop = Ctrl + Alt + left-click and drag the desktop space
* Windows transparent / opaque = possible with the "transset" utility or Alt + wheel
* Zoom-in once = Super-key + Right
* Zooms in manually = Super-key + wheel mouse up
* Manual reduced = Super-key + wheel mouse down
* Move window = Alt + left-click
* Move the window stick border = Left Ctrl + Alt and then began to drag
* Resize the window = Alt + middle-click
* Bring up the window below the top window = Alt + middle-click
* Dynamic effects deceleration = Shift + F10
* Watermark = hold Ctrl + Super key
* Rain = Shift-F9
* Desktop that = Ctrl + Alt + down arrow, then hold down Ctrl + Alt and left / right arrows to select Desktop -------------------------- ----------------------
9, the following can be find in the new legislation was to
compiz: used to configure ubuntu special effects such as rotation, 3D effects.
awn: configure window navigation, installed, select Applications - Accessories - Avant Window Navigator, you can
g2ipmsg: IP Messenger, LAN pass information easily ------------------------------------- -----------
10, ubuntu terminal command used
NO Classification PS1 command function name and parameter usage notes
1 File Management # ls ls-a lists all files under the current directory, including. Head hidden files file management # ls ls-l or ll list the current details of the file directory file management # pwd pwd View current the absolute path of the directory where the file management # cd cd .. back to the current directory on a directory file management # cd cd - back to the previous directory file management # cd cd ~ or cd back to the current user's home directory file management # cd cd ~ username back to the specified user's home directory
2 File Management # mkdir mkdir directory name to create a catalog file management # mkdir mkdir-p to create a number of nested recursive directory file management # rmdir Rmdir empty directory name to delete an empty directory
3 File Management # rm rm file name file name to delete a file or multiple files file management # rm rm-rf non-empty directory name recursively delete a directory of all non-empty, not to mention type-f
4 File Management # cat cat file name to view file contents one screen
5 document management # more more page view contents of the file file name
6 Document Management # less less controllable paging file name to view file contents
7 file management # grep grep-character file name to view the file according to the character matching part
8 document management # mv mv path / file / via / move the file under the file path relative to the absolute path of the file management # mv mv file name under the new name in the current directory renamed
9 file management # cp cp / path / file. / Move the file under the absolute path to the current directory
10 File Management # find find path-name "string" to find path to meet within the range of files and directories that match the string
11 File Management # ln ln source link to the current directory the source file name to create a hard link
ln / home / test / usr/test1 in / usr established under / home / test of the hard link
12 File Management # ln Ln-sab create a current directory of symbolic links b
13 File Management # touch touch file1 file2 create two empty files
14 Disk Manager # df df file system for reporting the total capacity, usage, remaining capacity.
15 Disk Manager # du du-b / home to see the current / HOME directory capacity (k) and sub-capacity (k).
16 Disk Manager # fdisk fdisk-l to view partition information system
17 Disk Manager # fdisk fdisk / dev / sdb as a new SCSI hard disk partition
18 Disk Manager # mkfs.ext3 Mkfs.ext3 / dev/sdb1
The first SCSI hard drive for the first primary partition formatted
ext3 file system
mkfs.ext2 Mkfs.ext2/dev/sdb2 formatted as ext2 file system
19 Disk Manager # mount mount-t type device file system path access pass # file system type disk management
Iso9660 CD-ROM file system
vfat Fat File System (windows)
Mount CD-ROM # mount-t iso9660 / dev / cdrom / mnt / cdrom
Mounting FAT # mount-t vfat / dev/hda5 / mnt / cdrom ide hang the first logical partition of the fifth
17 Disk Manager # Umount / mnt / cdrom uninstall / mnt / cdrom is empty
18 file permissions # chmod chmod u + s file to file with the special permission of the owner
chmod g + r file with the file's read permissions are set
chmod o + w file as a file with write permissions to other users
chmod ax file minus the file execute permissions for all users
chmod 765 file for the file's owner is set to full permissions, group set to read or write, other users have read and execute permissions to the heart
19 file permissions # chown chown root / home to / home of the owner changed the root user
20 file permissions # chgrp chgrp root / home to / home is set into the root group of
21 Print Management # redhat-config-printer-tui access to install the printer interface
22 Print Management # lp lp-d hptr file print file to the printer hptr
23 Print Management # lpq Lpq-P printer name to view the printer status
24 Print Management # lprm Lprm-P printer name within the printer to delete a print job
25 Print Management # disable Disable-r "changing The mouth mouth The mouth mouth The mouth " HPtr disable the printer and prompts the reasons
26 Print Management # enable Enable HPtr re-enable the disabled
27 User Management # useradd Useradd create a new user
28 User Management # groupadd Groupadd group name to create a new group
29 user management # passwd Passwd username users to create password
30 User Management # Passwd-d Passwd-d username user password can also visit
31 User Management # Passwd-l Passwd-l username account password locked
32 User Management # Passwd-u Passwd-u username unlock the account password
33 User Management # Passwd-S Passwd-S user name account password query
34 User Management # Usermod-l Usermod-l new user name and old user name user renamed
35 User Management # Usermod-L Usermod-L to lock the lock user login user name
36 User Management # Usermod-U Usermod-U user name unlock unlock user login
37 User Management # Usermod-u Usermod-u 501 username change users UID
38 User Management # Userdel Userdel-r user name to delete all users
39 User Management # Groupmod-n Groupmod-n new user name and old user name group renamed
40 User Management # Groupmod-g Groupmod-g 501 group name change group GID
41 User Management # groupdel Groupdel group name should be deleted first group of its users to delete
42 User Management # gpasswd-a gpasswd-a user group name add users to groups
43 User Management # Id id user name check user information
44 Software Management # rpm-qa rpm-qa | less Installed RPM query
45 Software Management # rpm-qa | grep ftp query specified RPM
46 Software Management # rpm-q rpm-q check the installed RPM package is installed
47 Software Management # rpm-q telnet-server telnet server package see
48 Software Management # rpm-qi rpm-qi package name to view description of software
49 Software Management # rpm-ql rpm-ql package names package file list query
50 Software Management # rpm-qf rpm-qf package a file belongs to a name query package
51 Software Management # rpm-qp rpm-qp full package name check is not installed package information
52 Software Management # rpm-e rpm-e to delete the specific package package name
53 Software Management # rpm-U rpm-Uvh to upgrade packages the full package name and display the process
54 Software Management # rpm-ivh rpm-ivh the full package name and display the process of installing packages
55 Software Management # rpm-V rpm-V package name verification package size, type, etc.
56 Software Management # tar-c-x create a release package package-v show command process on behalf of archive-z
57 Software Management # tar-cf tar-cvf benet.tar / home / benet to / home / benet directory package
58 Software Management # tar-czf tar-zcvf benet.tar.gz / mnt directory packaged and compressed into
59 Software Management # tar-tf tar-tf benet.tar to see a list of non-compressed files
60 Software Management # tar-tzf tar-tf benet.tar.gz to see a list of archive files
61 Software Management # tar-xf tar-xf benet.tar non-compressed file recovery
62 Software Management # tar-zxvf tar-zxvf benet.tar.gz extract archive files recovery
63 Software Management # tar-jxvf tar-jxvf benet.tar.bz2
64 Software Management # diff diff file1 file2> patch name. Patch for the patch files to generate new and old files
65 Software Management # diff diff file1 file2 compare the difference between two files
66 software patch management # Patch Patch file name. Patch patch
67 software management #. / Configure - prefix = / usr / local / configure before compiling
68 # make compile software management
69 Software Management # make install install compiled source package
70 boot manager # reboot Init 6 LINUX system reboot
71 boot manager # Halt Init 0 Shutdown-h now closed LINUX system
72 boot manager # runlevel displays a system-level
73 boot manager # Init [0123456] change the system run level, seven
74 boot manager # Chkconfig - list [service name] to view the status of service
75 boot manager # Chkconfig - level <run class> <service name> on | off | set to set the service startup state
76 boot manager # Chkconfig <service name> on | off | set set of non-independent service start state
Dynamic process management # Top 77 Ps-aux static process system process tree view pstree
# 78 process management application program name & background
79 # fg process management background process back to front
80 # bg process management transferred to the background to the foreground process
81 process management # renice Renice +1 180 180 The plus 1 priority of a process
82 process management # kill Kill PID PID to terminate a process
83 process management # at at 5pm + 3 days
/ Bin / ls 5:00 pm three days after the implementation of the specified / bin / ls
84 process management # crontab Crontab-e to edit with VI in the form of periodic tasks automatically
85 process management # crontab Crontab-l view the automatic periodic tasks
86 process management # crontab Crontab-r remove the automatic periodic tasks
87 process management # crond Service crond <start|stop|restart|status>
Immediately start the automatic periodic service Service crond <start | stop | restart | status>

Implement disk quotas (Note created when installing LINUX / home partition)
Objective: user zhao in the / home directory to achieve soft limit is 5k, hard limit of 10k of disk quota implementation steps:
1 modified includes / home line, # vi / etc / fstab, changed: defaults, usrquota. Usrquota item is increased. Then save and exit.
2, uninstall / home directory # umount / home
3. Mount the / home directory # mount / home
4, increase user zhao # useradd zhao
5, change the password # passwd zhao
6, generated on the / home directory quota information # quotacheck-cmug / home
# Quotacheck-vu / home
7, all user information # repquota-au
8, quotas # edquota-u zhao
The soft and hard, respectively, to 5 and 10
9, save and exit # wq!
10, Modified # edquota-t
11, # wq!
12 open / home on a disk quota feature # quotaon / home
13 queries quota # quota-u zhao
14 Verify that the quota # su - zhao
$ Touch myfile
11, run the jar file in the terminal to find the jar file directory, type the command java-jar xxx.jar
Can ------------------------------------------------
12, GNOME shortcuts
[Edit] General shortcuts
Similar to Windows Alt + F1 under the Win key, the GNOME open the "Applications" menu (Applications)
Alt + F2 similar to Windows under Win + R key combination to run the application in GNOME
Ctrl + Alt + D in Windows similar to the Win + D key combination to show the desktop
Ctrl + Alt + L for Windows similar to the Win + L key combination to lock the desktop, difference is that while the screen saver starts
Ctrl + Alt + → / ← switch between the different table
Ctrl + Alt + Shift + → / ← to move the current window to a different table
[Edit] Ubuntu General shortcuts
PrintScreen capture full screen
Alt + PrintScreen capture the current window
Ctrl + Alt + F1-F4 to enter full-screen terminal
Ctrl + Alt + F7 to return the desktop
<- Ctrl + Alt + Shift + F8 unknown (or analog terminal end)
Ctrl + Alt + Shift + Fn terminal N or analog terminal N (n and N is the number 1-6) ->
[Edit] window operations keyboard shortcuts (Metacity window manager)
[Edit] Mouse operation
Shift + middle button drag the file icon, move the menu
Alt + left-drag moves window
Alt + Shift + left drag to move the window and you can stay in the edge of the window
Alt + Right menu pop-up window manager
Alt + drag to change the window size in keys
[Edit] Pure keyboard
Alt + ESC to switch between different window
Alt + Tab for compatibility under Windows Alt + Tab key combination used to provide a second "switch between windows in different programs."
Close window Alt + F4
Alt + F5 to cancel maximize the window (the window to restore the original size)
Alt + F7 Move window (Note: In the window maximized state is invalid)
Alt + F8 to change the window size (Note: In the window maximized state is invalid)
Alt + F9 Minimize window
Alt + F10 to maximize the window
Alt + Space to open the window control menu (click the upper left corner of the icon window menu that appears)
[Edit] application in the commonly used shortcut keys
(Note: does not apply to all programs)
Ctrl + N New window
Ctrl + X Cut
Ctrl + C Copy
Ctrl + V Paste
Ctrl + Z undoes the last step
Ctrl + Shift + Z / Ctrl + Y Redo the step just withdraw
Ctrl + S Save
Ctrl + B Bookmarks
[Edit] File Browser (part)
Ctrl + H Show hidden files (shift key)
Ctrl + T New Tab
Ctrl + W Close tab
Ctrl + Page Up on a label
Ctrl + Page Down the next tab
Alt + N to switch to N-label (N is the number)
[Edit] In Ubuntu custom keyboard shortcuts to access "System> Preferences> Keyboard Shortcuts", select the items you want to set, and then type the shortcut key to health

13, Ubuntu can not be networked, suggesting Networking disabled, then need to restart about network-manager, specifically as follows: (not verified)
b456 @ b456: ~ $ sudo service network-manager stop
[Sudo] password for b456:
network-manager stop / waiting

b456 @ b456: ~ $ sudo rm / var / lib / NetworkManager / NetworkManager.state

b456 @ b456: ~ $ sudo service network-manager start
network-manager start / running, process 2433

14, chown, chmod usage [Modify Permissions]
Linux / Unix is a multitasking operating system than all the files Jie owner. You can use chown to change file owner. Generally, this command only by the system administrator (root) is used, end users do not have permission to change someone else's file owner, and also do not have permission to own the file's owner is set to change others. Only the System Administrator (root) have permission to do so.

Decompression tomcat6, copy the installation files to / usr / local / directory, enter the command console in the console,
sudo tar-zxvf apache-tomcat-6.0.28.tar.gz,
Extract the installation package to apache-tomcat-6.0.28 directory after

Will find the extracted file above had a lock, which means that the folder permissions are super-administrator, if you want to modify or run it, the system will prompt the user does not have permission, this time on the need to modify the folder privileges to normal use

sudo chown-R jess: users / home / ... / file.txt
sudo that need to give the super-user privileges, the owner of the file file.txt set the users group of users jess


$ Chown root test to test the file's owner to improve root
$ Chown-R root test_directory test_directory directory recursively to all files into root owner
$ Chown - dereference root test_link test_link link to the original owner of the file into a root, link the file owner change
$ Chown - no-dereference root test_link link to test_link owner of the file into root, the original owner of the file unchanged

chmod: the current directory of all files and subdirectories have set the users group by key users lamport:
chmod-R lamport: users *

  • ubuntu common functions and commands collection (their collated, 2011 -01-04 updated) 2010-11-18

    Blue font that new entrants 1.1, to open in ubuntu. TXT files, the Chinese appear garbled, the solution: Input terminal gconf-editor bring up the gconf-edit PS: you can enter gconf-editor, not the front plus Sudo Followed by opening the apps-> gedit-

  • Ubuntu 11.10 source list (probably in October 2011 will be updated synchronously) Oneiric Ocelot 2011-09-27

    Shabby homes blog updates, refer to the article in the methods and Ubuntu 10.10 update updates the source address of the source list NetEase open source mirror, provides FreeBSD, OpenBSD, archlinux, centos, cygwin, debian, fedora, gentoo, kernel, ope

  • JSP bean package common functions used 2010-07-14

    This article describes the JSP bean package common functions using the article topic. 1, the establishment of a Bean package guestbook; import java.sql .*; / ** * Title: Javabean connection with the database * Description: use the common database fun

  • git-svn example of common functions 2010-09-14

    git-svn example of common functions Version of the requirements Must ensure that git-core and git-svn version greater than 1.5.3, the version used here was ~ bpo40 +2. svn repository We are here to Google Code Hosting provided by the svn re

  • JQuery selectors, common functions and jq file 2010-10-26

    // Selector to use var elements = $("h2 a"); // Select all h2 tags that under the a Tags // Tag selector $("ul li:has(a)").addClass("myClass"); // That under the ul tag li Tag element has a label Add myClass Style // Location

  • LIB rough FLEX3 common functions library - flex3ExtLib 2010-11-10

    Simple order, the release of a rough FLEX3 common functions LIB library-flex3ExtLib, contains the following common features: 1, load the wait 2, the back-end service calls 3, swf to obtain parameters 4, DataGrid save the excel file data 5, editable D

  • Collection of commonly used functions and commands ubuntu (their collated) 2010-11-18

    1, in the open under ubuntu. TXT files appear garbled in Chinese, the solution: Input terminal gconf-editor bring up the gconf-edit PS: Enter gconf-editor to the front without adding Sudo Followed by opening the apps-> gedit-2-> preferences-> enc

  • Ubuntu common commands and common development environment for problem solving Notes 2010-07-17

    Just go to win full ubuntu, many commands are not familiar with some commonly used now to record the order information to avoid frequent google. 1.rm-rf to remove a non-empty directory name, all non-empty directory 2. To change the file or directory

  • Collection of Oracle common functions 2010-08-11

    Oracle numeric functions common feature highlights: To obtain the client IP address trim (NVL (sys_context ('userenv', 'ip_address'), '255 .255.255.255')) abs (m) m the absolute value mod (m, n) m is the remainder after n addition to power (m, n) m o

  • Common Functions SQL Collection 2011-08-26

    First, the character conversion functions 1, ASCII () Returns a character expression the leftmost characters of the ASCII code value. In the ASCII () function, the string can be a pure number''not enclosed, but with other characters in the string mus

  • [Reprinted] 110 collated common functions 2010-09-25

    1. ASCII Returns the character corresponding to the specified decimal number; SQL> select ascii (A) A, ascii (a) a, ascii (0) zero, ascii () space from dual; AA ZERO SPACE --------- --------- --------- --------- 65,974,832 2. CHR Given integer, retur

  • Collection of java code for common functions 2010-07-09


  • Learning about linux common commands collection 2011-07-04

    1. Cp ---- copy files eg: cp filename1 filename2 / / copy into the filename1 filename2 2.rm delete files and directories eg: rm 1.c / / delete this file will 1.c 3.mv remove the directory or file name change eg: mv filename1 filename2 / / will be ren

  • Linux common commands Collection 2011-09-14

    Show log file tail-n-f the log file line numbers were used to observe the log of the last n lines of the refresh Delete directory rm-rf directory Decompression tar-zxvf apr-1.4.2.tar.gz Compression tar-czvf this.tar.gz ./*.* Get System Time date + '%

  • Common functions transferred oracle 2010-04-20

    In SQLPLUS, the implementation - English character set conversion alter session set nls_language = 'AMERICAN'; alter session set nls_language = 'SIMPLIFIED CHINESE'; Key knowledge points: First, the operation of the table 1) building the table create

  • oracle blind in mind - Common Functions 2010-06-13

    CEIL (n) greater than or equal to the number function is used to return the smallest integer n FLOOR (n) This function is used to return less than the maximum integer equal to the number n MOD (m, n) This function is used to obtain more than two numb

  • [Transfer] DOS network commands Collection 2010-09-28

    The Complete Works of DOS network commands Order here about the DOS network commands Ping Ping is a frequently used utility, used to determine whether the local host and other host exchange (send and receive) data reported. According to the informati

  • EmEditor common functions 2010-11-02

    1. EmEditor sources Official website: http://www.emeditor.com Free Version: EmEditor Free 6.00.4 (functional limitations) This article uses version is Professional 4.13 real money to buy the registered version. 2. Modulation display Menu Tools-> All

  • Common functions SQLServer and Oracle Comparison 2011-01-12

    1. The absolute value of S: selectabs (-1) value O: selectabs (-1) valuefromdual 2. Take the whole (large) S: selectceiling (-1.001) valueselectceil (-1.001) valuefromdual 3. Take the whole (small) S: selectfloor (-1.001) value O: selectfloor (-1.001

  • db2 sql syntax and common functions 2011-08-04

    A commonly used commands 1 to establish a database DB2 _GCB CREATE DATABASE DB2 _GCB ON G: ALIAS DB2 _GCB USING CODESET GBK TERRITORY CN COLLATE USING SYSTEM DFT_EXTENT_SZ 32 2 connect to the database connect to sample1 user db2admin using 8301206 3.