Ubuntu system commands (updating), ubuntu updating

Source: Internet
Author: User

Ubuntu system commands (updating), ubuntu updating

1. Enable Ubuntu root User:

Set the root password for sudo passwd root (not required once)

Switch su root to the root user

2 disable Ubuntu root users:

Sudo passwd-l root (disabling the root password will not change)

Sudo passwd-u root (enable root account)

 

3. Download nodejs

 

1. Sudo apt-get install nodejs

 

After the installation is complete* Node-v *Check whether the nodejs installation is successful, but the result is that no node command is available.* Js-v *It is valid. It is inferred that nodejs is installed with apt-get, and js is automatically soft connected to nodejs. If you are not used to it, you can create a soft connection to node.

 

Ln-s/usr/bin/nodejs/usr/bin/node// Bind the global environment

 

2. sudo apt-get install npm

 

You don't need to bind the environment.

4. Common commands

DELETE command:

Rm: delete non-empty directories (multiple files can be deleted)

Rmdir: delete an empty directory.

Rm-rf directory name

-R refers to recursion down to manage the number of levels of directories and delete them together.

-F means to delete the file directly without any prompts.

5. Create a command

Mkdir directory name New Folder

Touch file name New File

6. Copy commands

 

Cp file name target path (copy a file to the target path)

 

Cp-I (if a file with the same name exists, output [yes/no] to check whether execution is performed)

 

Cp-f (Force copy file, with the same name not required)

7. Update command

 

Sudo apt-get upgrade (Update installed packages)

 

Sudo apt-get update (update source database)

 

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.