Linux personal operation habits

Source: Internet
Author: User

Linux personal operation habits
Edit ~ /. Add the following content to the bashrc file and define the alias #. bashrc # User specific aliases and functions alias rm = 'rm-I 'alias cp = 'cp-I' alias mv = 'mv-I 'alias cls = 'clear' # under DOS 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 definitions if [-f/etc/bashrc]; then. /etc/bashrc fi. Save and exit after modification. source ~ /. Bashrc to make it take effect #. bash_profile # Get the aliases and functions if [-f ~ /. Bashrc]; then .~ /. Bashrc fi # User specific environment and startup programs PATH = $ PATH: $ HOME/bin:/usr/bin/python export CDPATH = .:~ :/Etc:/var:/root/Desktop export PATH unset USERNAME function 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.255 ifup [eth0] Enable ifdown [eth0] disable Nic IP forwarding: /proc/sys/net/ipv4/ip_forward: 1/etc/sysconfig/network FORWARD_IPV4 = YES host name setting configuration file:/etc/sysconfig/network command line: # hostname [host]/etc/hosts configure IP long_name short_name alias 127.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.

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.