This blog post is I learn some knowledge based on Ubuntu notes, convenient for future review, here to unify records, of course, when learning new things will be updated!!! Also please Bo Master don't laughed at, brother here thanked ~\ (≧▽≦)/~!!!!!
1, simple configuration of Ubuntu:
For personal reasons, I do not like to put something very fancy on the table, the pursuit of simplicity has always been my personal admiration. So, my Ubuntu system configuration is no exception, first on a desktop spy Photo:
1.1 Installation Numix Theme:
The landlord I installed is the theme of Numix Circle series, personally feel good. According to personal hobbies, the theme, look at the acid cool on okay!
sudo add-apt-repository ppa:numix/ppasudo apt-get updatesudo Install numix-icon-theme-circle
1.2 Installation of common software:
Unity Tweak Tool, new software software package, Sogou Input method, these three softwares can be in Ubuntu Software Center and Sogou input Judge network download to, here no longer repeat, as for the other software I do not introduce, because I did not install, the demand is not big.
Conky Installation and configuration: If you want your desktop to display some information in real time, Conky may be able to help you. Convenient, beautiful and convenient, you deserve to have.
//Installation:sudoApt-getInstallConky//Configuration://after installation Conky The default is not to create a corresponding. conkyrc file for you, so we need to create a corresponding file under the current user directory (my is/home/hippiezhou). Then add our configuration code.
My configuration code is as follows:use_spacer rightuse_xft yesfont Microsoft yahei:size=8Xftfont Microsoft yahei:size=8#xftfont Wenquanyi Zen hei:pixelsize= AOverride_utf8_locale Yesupdate_interval1.0Own_window yesown_window_type normalown_window_transparent yesown_window_hints undecorated,below,sticky,skip_ Taskbar,skip_pagerdouble_buffer yesminimum_size206 5Maximum_width -draw_shades yesdraw_outline nodraw_borders nodraw_graph_borders nodefault_color ffffffdefault_shade_color000000Default_outline_color000000Alignment top_rightgap_xTengap_y -Cpu_avg_samples2uppercase No # set to YesifYou want all text to beinchUppercasetext${font Microsoft Yahei:style=bold:pixelsize= -}${alignc}${ Time%h:%m:%S}${font Microsoft yahei:pixelsize= -}${alignc}${ Time%b%d Day week%a}${font Microsoft yahei:pixelsize= A}${color #ffd700}${hr1} $color ${color #98c2c7} host Name: ${color #db7093} $alignr $nodename${color #98c2c7} kernel: ${color #db7093} $ALIGNR $kernel${ Color #98c2c7} powered on: ${color #db7093} $ALIGNR $Uptime${color #98c2c7}ip address: ${color #db7093} ${alignr} ${addr wlp1s0}${color #98c2c7}cpu usage: ${color #db7093} $ALIGNR $cpu< /c0>%${color #78af78} $cpubar ${color #ddaa00} ${top name1} $ALIGNR ${top CPU1}${color Lightgrey} ${top name2} $ALIGNR ${top CPU2}${color Lightgrey} ${top name3} $ALIGNR ${top CPU3}${color #98c2c7} physical Memory: ${color #4169e1} $alignr ${color} $mem ${color #98c2c7}/${color} $memmax ${color #4169e1}${color #db7093} $memperc%${color #78af78}${membar}${color #98c2c7} root partition: ${color}${alignr}${fs_free/}/${fs_size/}${color #78af78}${fs_bar4/}${color #98c2c7}home partition: ${color}${alignr}${fs_free/home}/${fs_size/Home}${color #78af78}${fs_bar4/home}${color #98c2c7} download speed: ${color} ${downspeed wlp1s0} k/s${color #98c2c7} upload speed: ${color} ${upspeed wlp1s0} k/S${color #ffd700}${hr1} $color
//In order to ensure that the conky can be started every time the system starts, we need to add a system boot entry for Conky.
//Search for "launch application" in your dash and add our Conky as a startup item.
Name: Conky
command:/usr/bin/conky-p
Note: Load the Conky
//NOTE: If you want to start conky manually, just press and hold ctrl+alt+t and enter the command Conky
1.3 Disable Guest Mode:
Vim /usr/share/lightdm/lightdm.conf.d/-unity-greeter.conf
Add a line of code to the last line:
Allow-guest=false
Then ESC->:WQ to save (may require sudo to power)
1.4 Other related configurations:
Language Pack Missing: language-selector-gnome
Flash Installation: sudo apt-get install Flashplugin-installer (to be honest, I installed this thing really long time, odd slow!). )
2. Ubuntu command:
sudo apt-get autoclean //Clean up older versions of the software cache
sudo apt-get clean//cleans up all software caches
sudo apt-get autoremove //Remove orphaned software that is no longer used by the system
uname-a //view kernel
sudo lshw //Display current hardware information
Pstree //view current process tree
Multi-Threaded Download
sudo apt-get install Axel
Axel-n 5 Http://xxx.xxx.xxx.xxx/xxx.zip
Or
Lftp-c "Pget-n 5 http://xxx.xxx.xxx.xxx/xxx.zip"
How to switch to the root account
Sudo-s
Sudo-i
sudo su
cat file name //One-screen view of file contents
cat/etc/vsftpd.conf |grep-v ^# // do not display lines that begin with #
More file names //Paging to view file contents
Less file name//Controllable paging to view file contents
NL file name orcat-n file name//With line number to display the contents of the file
cut-c 5-a.py//Remove line numbers from the file
cat file.txt |sort-uDelete duplicate rows in a file
Touch filenameCreate 1 empty files
rm-fr FolderRecursively delete nested directories
file filenameView File types
stat filenameTime to view files
diff file1 File2See the differences between two files
TAR-ZXVF xxx.tar.gzDecompression xxx.tar.gz
TAR-JXVF xxx.tar.bz2Decompression xxx.tar.bz2
TAR-ZCVF xxx.tar.gz AAA BBBCompression AAA BBB directory for xxx.tar.gz
TAR-JCVF xxx.tar.bz2 AAA BBBCompression AAA BBB directory for XXX.TAR.BZ2
command to shut down the machine
sudo halt
sudo shutdown-h nowNow turn off the machine
Timer shutdown
sudo shutdown-h 23:0011 o'clock automatic shutdown at night
sudo shutdown-h +60Auto power off after 60 minutes
command to restart your computer
sudo reboot
sudo shutdown-r now
3. Git:
This Part I do not intend to carry out detailed introduction, I think can meet my basic needs (clone, pull, push, merge) can be, as for some of the high-class operators or refer to the garden of other Daniel Bar. I am here to list only a few of the commands I used to facilitate my restudying.
new Code Base # Create a new Git code library in the current directory $ git init# create a new directory and initialize it to git code base $ git init [Project-name]# Download a project and its entire code history $ git clone [Project-Path] Two, the configuration git settings file for. Gitconfig, which can be in the user home directory (global configuration), or under the project directory (project configuration). # shows the current git configuration $ git config--list# Edit git configuration file $ git config-E [--global]# Setting the user information when submitting code $ git config [--global] User.Name"[Name]"$ git config [--global] User.email"[email address]"third, increase/Delete File # Add specified file to staging area $ git add [file1] [file2] ... # Add the specified directory to staging area, including subdirectories $ git add [dir]# Add all files of the current directory to staging area $ git Add. # Delete the workspace file and put this deletion into staging area $ gitRM[File1] [file2] ... # Stop tracking the specified file, but the file will remain in the workspace $ gitRM--cached [file]# renamed the file and put this name in staging area $ gitMV[file-original] [file-renamed] IV, Code submission # Submit staging area to warehouse area $ git commit-m [message]# commits staging area the specified file to the warehouse area $ git commit [file1] [file2] ...-m [message]# commit workspace changes since last commit, direct to warehouse area $ git commit-a# Show all diff information when submitting [Ctrl+X then y exit]$ git commit-v# Use a new commit, instead of the last commit # If the code does not have any new changes, it is used to overwrite the commit information of the last commit $ git commit--amend-m [message]# redo the last commit and include a new change to the specified file $ git commit--Amend ... V. Branch # List all local branches $ git branch# list all remote branches $ git branch-r# List all local branches and remote branches $ git branch-a# creates a new branch, but still stays on the current branch $ git branch [branch-name]# Create a new branch and switch to the branch $ git checkout-b [branch]# creates a new branch, points to the specified commit$ git branch [branch] [commit]# creates a new branch, establishes a tracking relationship with the specified remote branch $ git branch--track [branch] [remote-branch]# switch to the specified branch and update the workspace $ git checkout [branch-name]# establishes a tracking relationship between the existing branch and the specified remote branch $ git branch--set-upstream [branch] [remote-branch]# Merge specified branch to current branch $ git merge [branch]# Select a commit, merge into current branch $ git cherry-Pick [commit]# Delete branch $ git branch-D [branch-name]# Delete Remote branch $ Git push Origin--Delete $ git branch-Dr VI, label # list all tag$ git tag# new a tag in the current commit$ git tag [tag]# create a new tag in the specified commit$ git tag [tag] [commit]# view tag info $ git Show [tag]# commits the specified tag$ git push [remote] [tag]# commits all tag$ git push [remote]--tags# Create a new branch, point to a tag$ git checkout-b [branch] [tag] VII, view information # Show changed files $ git status# show the current branch version history $ git log# show commit history, and each commit changed file $ git log--Stat# shows the version history of a file, including file name rename $ git log--follow [file]$ git whatchanged [file]# displays each diff$ git log associated with the specified file-P [file]# shows what time the specified file was modified by git blame [file]# Show staging area and workspace differences $ gitdiff# shows the difference between staging area and the previous commit $ gitdiff--Cached []# shows the difference between the workspace and the current branch of the latest commit $ gitdiffhead# Show the difference between two commits $ gitdiff[First-branch] ... [second-branch]# shows the metadata and content changes of a commit $ git show [commit]# shows a file that has been changed by a commit git show--name-Only [commit]# shows the contents of a file when a commit, git show [commit]:[filename]# shows the last commit of the current branch $ git reflog eight, remote sync # Download all changes to the remote repository $ git fetch [remote]# Show all remote warehouses $ git remote-v# display information for a remote repository $ git remote show [remote]# Add a new remote repository and name git remote add [shortname] [url]# Retrieve changes to the remote repository and merge with the local branch $ git pu ll [remote] [branch]# upload locally specified branch to remote repository $ git push [remote] [branch]# forcibly pushes the current branch to the remote repository, even if there is a conflict $ git push [remote]--force# push all branches to remote repository $ git push [remote]--All Nine, Undo # Restore Staging area specified file to workspace $ git checkout [file]# Restore the specified file of a commit to the workspace $ git checkout [commit] [file]# restores all the files from the last commit to the workspace $ git checkout. # resets the specified file for staging area, consistent with the last commit, but the workspace is unchanged $ git reset [file]# Reset Staging area with workspace, consistent with last commit $ git reset--hard# resets the current branch pointer to the specified commit while resetting staging area, but the workspace does not change the $ git reset [commit]# resets the current branch's head to the specified commit, while resetting the staging area and the workspace, consistent with the specified commit $ git Reset--Hard [commit]# resets the current head to the specified commit, but keeps the staging area and workspace unchanged $ git reset--Keep [commit]# creates a new commit, which is used to revoke the specified commit# all changes to the latter will be offset by the former and applied to the current branch $ git revert [commit] ten, the other # generates a compressed package that can be released $ git Archive
4. Vim:
In fact, Ubuntu system has built a learning vim tutorial, you just need to enter vimtutor on the command line. There is a very detailed tutorial, as long as you are willing to be patient. I'm not going to make a detailed record of this part, practice makes perfect, practise often, forget to look at the help document more to see the knock on the almost remember.
Ubuntu (14.04LTS) Learning notes