Network Configuration and Shell basics

Source: Internet
Author: User
Tags server port ssh server

One: The cluster has done two: temporary Configuration network (IP, gateway, DNS) + permanent configuration

To configure the network temporarily:

IP: [[email protected] ~]# ifconfig

[Email protected] ~]# ifconfig eno16777736 192.168.24.129/24

Gateway: [[email protected] ~]# route add default GW 192.168.24.1 netmask 255.255.255.0

[Email protected] ~]# route-n

Dns:[[email protected] ~]# vim/etc/resolv.conf

Permanent configuration:

[Email protected] ~]# cd/etc/sysconfig/network-scripts/

[Email protected] network-scripts]# vim ifcfg-eno16777736

[Email protected] network-scripts]# systemctl Restart Network

Three: The machine in the cluster to set the hostname, the use of/etc/hosts file to resolve all the host names in their own cluster, the corresponding, the cluster configuration should be changed to use the host name of the way

Four: SSH login, scp upload, download, ssh key login, modify the SSH server port to 8888 and then login and SCP test

Five: Organize the bash command type to verify the priority of finding a command

==> Alias
==> Compound Commands
==> function
==> build_in
==> Hash
==> $PATH

function with built-in priority [[email protected] ~]# function CD () {echo 123;}

[[Email protected]~]# CD]

123

[[Email protected]~]# unset CD

Six: Wildcard experiment

~ Home directory: Switch home directory cd~

~ Overwrite command

[[Email protected]~]# echo Hello world > A.txt

~ Append command

[[Email protected]~]# echo Hello world >> b.txt

Network Configuration and Shell basics

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.