Detailed introduction to personalized configuration techniques for Linux operating systems

Source: Internet
Author: User
Article Title: detailed introduction to personalized configuration techniques for Linux operating systems. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

/Etc/bashrc (run it when running SHELL and write it after the original configuration ):

Alias lf = 'LS-F'

Export PS1 = '\ w @ \ u \ $>' # The prompt displays the current path and user

Alias ls = 'set *; echo "There is $ # Files! "; Set --; ls-a -- color = tty '# enable the ls command to display the number of files and hide files

~ /. Bashrc (executed each time a new SHELL is opened, with a lower priority than/etc/bashrc ):

Alias mousb = 'mount/dev/sda1/usb-o iocharset = gb2312 '# attach a usb flash drive

Alias umousb = 'mount/dev/sda1' # detach the USB flash drive

Alias cd... = 'CD ..'

Alias cd-= 'CD -'

Alias sd = 'sudo'

Zhcon | clear # execute zhcon if you enter a Common Terminal (a Chinese terminal platform is supported); otherwise, clear the screen)

Echo '***********************'

Echo '* Welcome to MyLinux *'

Echo '***********************'

~ /. Vimrc (vim STARTUP configuration file ):

Set nu # display row number

Ser hls # display the search Character Color

Map I # # Define the F4 key so that it can automatically add the '#' annotation symbol

Set shiftwidth = 4

Set smartindent

Set expandtab

Set tabstop = 4

Set showmatch

Set backup

Set backupdir =/var/bak

Set backupext =. bak

Set nowritebackup

Set ai

Set cindent

Set encoding = UTF-8

Set fileencoding = chinese

Set fileencodings = ucs-bom, UTF-8, chinese

Set ambiwidth = double

/Bin/func. sh (My UDF file ):

#! /Bin/sh

Anykey () # function to continue by pressing any key

{

Echo-e "Press any key to continue... \ n"

Read-s-n1

}

Killpro () # kill well-known processes

{

Procid = 'pidof $2'

Kill $1 $ procid

Return 0

}

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.