Linux personal operating habits

Source: Internet
Author: User

Edit ~/.BASHRC file Add the following to define the alias #. bashrc # User specific aliases and Functionsalias rm= ' rm-i ' Alias cp= ' cp-i ' Alias mv= ' MV- I ' Alias cls= ' Clear '       #DOS下的清屏命令, can also be used ctrl+l, simple quick alias ls= ' ls-ltr--color=always '     #通过颜色辨别文件类型alias vi=vim              # By default, Vim becomes the editor, Vim has syntax highlighting, and you can find the error alias when scripting. = ' CD. '             #输入. Return directly to the parent directory for a simpler and faster alias. 2= ' CD. /..‘ Alias.. 3= ' CD. /.. /..‘ Alias.. 4= ' CD. /.. /.. /..‘ Alias.. 5= ' CD. /.. /.. /.. /..‘ Alias grep= ' grep--color=auto '     #通过grep搜索出的文件高亮显示 # Source Global definitionsif [-F/ETC/BASHRC]; then   . /etc/bashrcfi  all modified after saving exit,source   ~/.bashrc  make it effective  #. bash_profile # Get the aliases and Functionsif [-F ~/.BASHRC]; then   . ~/.bashrcfi # User specific environment and startup Programs path= $PATH: $HOME/bin:/usr/bin/pyThonexport cdpath=.:~:/etc:/var:/root/desktopexport pathunset usernamefunction mkdircd () {mkdir-p "[email  Protected] "&& eval cd" \ "\$$#\" "; }   Modify VIM Profile setting line number, automatically display,vi  ~/.VIMRC profile (Redhat) on each startup/etc/sysconfig/network-scripts/*: Nic/etc/ Sysconfig/network-scripts/ifcfg-eth0/etc/resolv.conf:dns configuration command line ifconfig [eth0]# ifconfig eth0 202.38.85.10 netmask 255.255.255.0 broadcast 202.38.85.255ifup [eth0]  start Nic Ifdown [eth0] disable NIC IP forwarding:/proc/sys/net/ipv4/ip_forward is 1/ Etc/sysconfig/networkforward_ipv4=yes hostname Provisioning Profile:/etc/sysconfig/network command line:  #hostname [host]/etc/hosts Configuring IP   long_name  short_name  alias127.0.0.1  localhost.localdomain localhost localhost   Before you modify the system files, you need to back up, go to a system and pay attention to the contents of the/boot/grub, and note the partition information

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Linux personal operating habits

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.