This is my second article talking about Linux cloud computing server. As a full stack developer, it seems to be out of my scoop. However, as a beginner in Linux Cloud computing industry, I think it will be a good idea to share my problems and solutions when I am working on Linux cloud computing server.
Usually, here is the normal working process on Linux cloud computing server:
- Estimate hardware requirement including CPU, memory, storage, I/O, or GPU (more and more tasks use GPU now), and networking.
- Purchase cloud computing server from vendor such as Amazon, Microsoft, Google, etc.
- Use SSH to login Linux server and setup software and services.
However, things don’t always happen the way you plan them to happen. This time, I need a Linux cloud server to setup Web server with database. One of my friend have a free one and share that one with me. He passes me the username, password and IP address to access the server. I know nothing about the server but the system is Linux. So I login the server and try to find out following information about the server:
- CPU information
- Memory information
- System information
- Software and Service
- Users and Groups
Get CPU Information in Linux Command Line
To get the CPU information of your Linux server, you can run following command:
After running above command, you will get the information such as processor model name, cpu speed, cache size, number of cores, etc.
Get Memory Information in Linux Command Line
To get the memory information of your Linux server, you can run following command:
This command will return a brief information about the system memory. You can also run following command to get more details:
Get Harddisk Information in Linux Command Line
To get the storage or hard-disk information of your Linux server, please try this command:
This command also will give a summary of your hard-disk information. If you want more details, please try following command. But this requires root permission:
sudo fdisk –l
Get Linux System Information
To start configure your Linux server, it is necessary to know your Linux system information, for example, the distribution name and Linux kernel version. To get the distribution name, you can run this command:
To get the Linux kernel version, please try this command:
Users and Groups
To make your server safe and secure, we must need to know what users in the system and the existing groups in the system.
To get a user list in the Linux system, we can run following command:
To add a new user to a certain group, we can try this command:
sudo useradd -m james -g ftpaccess -s /usr/sbin/nologin
The above command will create a user named james and add this user into ftpaccess group. -m will indicate to create a home directory and -s will indicate the login shell for this user.
Then, we can use this command to set a password for the user:
sudo passwd james
To get a group list in the Linux system, we can run following command:
To add a group, we can try this command:
sudo groupadd ftpaccess