How do I find out what version of Linux my server is running?
How do I find out what program is listening on a specific TCP Port?
How do I access my IP configuration?
How do I view a real-time list of processes, CPU usage, and memory?
How do I keep my system up to date?
What is the adminsp account?
How do I add/remove/edit users?
How do I determine how much hard disk space I have available?
What is RAID and how can it benefit me?
How do I change my server"s time?
What is Linux?
Linux is named after the Linux Kernel, which performs all of the typical tasks of an Operating System, such as multitasking, virtual memory, TCP/IP drivers, and libraries. This is commonly confused with a Linux Distribution, which is the work of a number of commercial and non-commercial organizations who add to, or enhance the basic functions of the Linux kernel. Red hat Enterprise Server and Debian are the two most prominent commercial and non-commercial Linux distributions, respectively.
How do I find out what version of Linux my server is running?
To print the kernel name, node name, kernel-release, kernel-version, machine name, and operating system (in this order);
# uname -a
Linux linux.servepath.com 2.6.11.2 #1 Fri Mar 11 15:53:55 PST 2005 i686
GNU/Linux
How do I find out what program is listening on a specific TCP Port?
To find the PID (process ID) of the process responsible for listening on a port (example queries the kernel for the process listening on port 22),
# fuser 22/tcp
22/tcp: 30010
All of the values to the right of '22/tcp' are PIDs that
- belong to processes spawned by the port in question, or
- belong to the process actually responsible for listening
To prevent listening on the port,
# kill -9 <pid responsible for listening>
How do I access my IP configuration?
Debian IP Configuration guide
Red hat IP Configuration guide
How do I view a real-time list of processes, CPU usage, and memory?
In order to see a real-time list of system resources, execute the following:
# top -s1
The above will call a "top" session that will update every second. By default, the processes are sorted in ascending order of CPU usage.
How do I keep my system up to date?
Debian Package Management
Tutorial
Red hat Package Management Tutorial
What is the adminsp account?
The adminsp account is ServePath"s administrative account, used for troubleshooting and diagnostics purposes. Please do not remove this user.
How do I add/remove/edit users?
To add a user,
# adduser (provide all prompted information)
To remove a user,
# userdel -r ftpuser
To change a user"s password,
# passwd ftpuser
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
(Any time the Linux system prompts for a password, nothing is displayed on the screen to keep from disclosing the length of the password.)
How do I determine how much hard disk space I have available?
In order to see how much disk space is available, execute the df ("disk free") command.
# df -h Filesystem Size Used Avail Use% Mounted on /dev/hda3 73G 11G 59G 15% / tmpfs 244M 0 244M 0% /dev/shm - Filesystem: This is the partition for which the information is gathered.
- Size: This is the amount of total space on the partition.
- Used: This is the amount of used space on the partition.
- Capacity: Used / Avail
- Mounted on: This is the mount point of the partition.
What is RAID and how can it benefit me?
How do I change my server"s time?
ServePath provides an NTP (Network Time Protocol) server, which can be used to ensure the correct time. To do so, a time zone must be defined. Find the desired time zone in /usr/share/zoneinfo. (The following shell code sets the time zone to Pacific Standard Time (PST).)
# rm -f /etc/localtime
# ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
Once the time zone is set, to execute the following to sync the current time with ServePath"s NTP server, install the ntp package (APT/RPM tutorials), and executing
# ntpdate ntp.servepath.com
2 Jun 21:21:01 ntpdate[31314]: step time server 216.93.160.62 offset
-11.498970 sec
will sync the local clock with the ServePath NTP server.