Linux personal operation habits, linux personal habits
Edit ~ /. Add the following content to the bashrc file and define the alias #. bashrc # User specific aliases and functionsalias rm = 'rm-I 'alias cp = 'cp-I' alias mv = 'mv-I 'alias cls = 'clear' # under DOS clear screen command, you can also use Ctrl + L to easily and quickly alias ls = 'LS-ltr -- color = alway' # identify the file type by color. alias vi = vim # by default, vim is used as the editor, vim has the syntax highlighting function. You can find the error alias during script writing .. = 'CD .. '# input .. press enter directly to go back to the parent directory to make it easier and faster .. 2 = 'CD .. /.. 'Alias .. 3 = 'CD .. /.. /.. 'Alias .. 4 = 'CD .. /.. /.. /.. 'Alias .. 5 = 'CD .. /.. /.. /.. /.. 'Alias grep =' Grep -- color = auto' # Highlight the file searched by grep # Source global definitionsif [-f/etc/bashrc]; then. /etc/bashrcfi save and exit after all the modifications. source ~ /. Bashrc to make it take effect #. 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/export topexport PATHunset USERNAMEfunction mkdircd () {mkdir-p "$ @" & eval cd "\" \$ $ #\"";} modify the row number of the vim configuration file, which is automatically displayed every time it is started. vi ~ /. Vimrc configuration file (Redhat)/etc/sysconfig/network-scripts/*: NICs/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] Enable ifdown [eth0] disable Nic IP forwarding: /proc/sys/net/ipv4/ip_forward: 1/etc/sysconfig/networkFORWARD_IPV4 = YES host name setting configuration file:/etc/sysconfig/network command line: # hostname [host]/etc/hosts configure IP long_name short_name alias127.0.0.1 localhost. back up localdomain localhost before modifying the system file. Go to a system and check the/boot/grub content, and pay attention to the partition information.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.