BT5 Linux basic commands and SSH enabled

Source: Internet
Author: User

For those who have studied BT5, it would be better if they have been familiar with the linux system. However, if you have never been familiar with it, you may need to learn from the most basic linux commands and system configurations. Here we will first learn some basic commands and network settings ......

Command:

1. passwd

Set the current user password, and enter the new password twice at the prompt. The password is not displayed.

2. ls, cd, rm, mkdir, cp, and mv

These commands are basic directory and file operation commands in linux. Ls column directory cd switch directory rm Delete mkdir create directory cp copy mv movement, they have different roles with parameters you can use the-help parameter to view parameters, Baidu can also learn these commands.

 

3. ifconfig

In Linux, the command for viewing the network is the same as ipconfig in win. In BT5, use ifconfig-a to view the NIC status.

Activate Nic

 

Then we set the IP address

Dhclient eth0 is used to obtain the IP address through DHCP.

 

Ifconfig manually sets the nic ip address ifconfig eth0 192.168.158.221 netmask 255.255.255.0

Set gateway route add default gw 192.168.158.254

Then we need to set up the DNS server. We first use more/etc/resolve. conf to view the configuration file, and then use the VI editor to edit it. (PS: The VI editor is Baidu ...)

Before Modification

After modification

Check whether the network is OK ..

4. apt-get

This command is used to update and install ubuntu...

Let's use apt-get update to see if there is anything to update.

Use apt-get to install Chinese support.

Apt-get install language-support-zh language-pack-zh

The installation will prompt whether to install and enter y to press enter, and then wait until the installation is complete.

Apt-get update cannot upgrade the software of BT5. You also need another command to upgrade the tools of BT5, apt-get upgrade.

 

 

Next we will turn on a linux function. ssh facilitates our operations ~~

If you run service ssh start directly, you will find that although port 22 is opened, you still cannot connect to ssh. Check the startup prompt and find that the certificate is missing as prompted. If there is no certificate, We will generate it .. Haha

Ssh-keygen-t dsa-f/etc/ssh/ssh_host_dsa_key

Ssh-keygen-t rsa-f/etc/ssh/ssh_host_rsa_key

Point to these two lines of command and then it will require entering the certificate password, we will use empty, directly press Enter.

 

Now we can connect to ssh ~~

 

 

From the radish header 'blog

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.