This article is an introductory note I wrote years ago when I first started using Linux. The content is for reference only.

System installation

Mounting suggestions:

Linux requires only two basic partitions/and swap;

If/enough, you can put a lot of things on your desktop without compromising the speed of getting into Linux.

partition The size of the format
1 / boot ⃣ ️ 128MB ext3
swap 2 ⃣ ️
/ 8GB ext3
/ home All the rest ext3

If you want to install a lot of software it is best to allocate /usr;

To be a server, it is best to allocate a large /var;

Note:

1 ⃣ ️. / boot:

New versions after 2018 can be divided;

You can allocate 10MB to 100MB

If the hard disk does not support LBA mode, you are advised to mount /boot to the first partition for safety.

Reference: wapbaike.baidu.com/item/boot partition…

2 ⃣ ️. Swap:

Physical memory swap Swap (Turn on sleep)
2GB Double RAM Three times as much RAM
>2GB-8GB =RAM Double RAM
>8GB-64GB 4GB+ 1.5 times the RAM
>64GB 4GB+ Sleep is not recommended

Reference: access.redhat.com/documentati…

The first few service configurations:

  • checktelnetWhether the service is started:
# chkconfig telnet --list
Copy the code
  • Start thetelnetServices:
# chkonfig telnet on
Copy the code

After Telnet is enabled, you can use “> Telnet $IP” in Win to connect to Linux.

  • inspectionFTPCurrent service Status:
# service vsftpd status 
Copy the code
  • openFTPServices:
# service vsftpd start
Copy the code

The system switches

$sudo XXX = $sudo XXX = $sudo XXX = $sudo XXX

  • Shut down the system:
Sync # init 0 or shutdown -n or haltCopy the code
  • Restart the system:
# sync # init 6 or shutdown -rnCopy the code
  • Exit current user login:
$ exit
Copy the code

Linux exit is similar to Windows logout;

  • View the current virtual terminal:
$tty /dev/tty2 # virtual terminal 2Copy the code
  • Switching terminal:
{Ctr + Alt + Fn}
Copy the code

Where n = {1, 2, 3… ,7}, for tty N.

Switch to graphics terminal (also a TTY) :

{Ctr + Alt + F7}
Copy the code
  • Clear the screen:
$ clear
Copy the code
  • Find all shells in the system:
$ cat /etc/shells
Copy the code
  • Switch shell:
$KSH # Switch to Korn ShellCopy the code

You can enter a non-existent command (such as OK) on the command line to determine the user’s current shell.