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