-
Linux Uptime Command
The Linux Operating System is filled with several commands which any aspiring Linux expert or power user e.g. system admin must have a good grasp of. One of such commands is uptime and today, I’ll briefly discuss its purpose and syntax. Uptime is a command that returns information about how long your system has been running together with the current time, number of users with running sessions, and the system load averages for the past 1, 5, and 15 minutes. uptime uses a simple syntax: Using Uptime You can run the uptime command without any options Output: Let’s see some useful uptime command usage with examples. Check Linux Server Uptime You can filter uptime’s result to show only the running time of the system with…
-
How to Open a Port in CSF Firewall?
What is a port A port is a communication endpoint. At the software level, within an operating system, a port is a logical construct that identifies a specific process or a type of network service. A port is identified for each transport protocol and address combination by a 16-bit unsigned number, known as the port number. The most common transport protocols that use port numbers are the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP). What is CSF CSF is a free and advanced firewall for Linux distributions and Linux based VPS. In addition to the basic functionalities of a firewall, CSF includes other security features such as login, intrusion, and flood detections. We can open ports in CSF by using the…
-
How to find if a network port is open ?
A TCP/IP network connection may be either blocked, dropped, open, or filtered. These actions are generally controlled by the IPtables firewall the system uses and is independent of any process or program that may be listening on a network port. Beyond the firewall, a program or process (a server or daemon) may be listening on a port or not listening. This can be checked using the netstat programs. Checking to see if a port is open, blocked, dropped, or filtered at the firewall is not simple. Using lsof to find open ports: lsof -i:22 ## see a specific port such as 22 ## lsof -i -P -n | grep LISTEN You…
-
Sync Linux System Clock with a Remote NTP Server
NTP stands for Network Time Protocol is an internet protocol, which is used to synchronize the system clock between computers. Please note that you must have NTP installed on the system to enable automatic time synchronization with NTP servers. Configuring NTP : Use the set-ntp argument to enable or disable automatic synchronization of your system clock with a remote server over the Network Time Protocol (NTP). Use the following command to enable this feature: Use the following command to disable this automatic synchronization over NTP: If using a service like chrony or ntpd to make changes, these are not shown by timedatectl until systemd-timedated is restarted:
-
How to change timezone
A time zone is a geographic region that has the same standard time. Typically the time zone is set during the installation of the operational system, but it can be easily changed at a later time. Using the correct time zone is essential for many systems related tasks and processes. For example, the cron daemon uses the system’s time zone for executing cron jobs. The time zone is also used for logs timestTo amps. To Check the Current Time Zone The output above shows that the system’s time zone is set to UTC. To Change the Time Zone in Linux Before changing the time zone, you’ll need to find out…
-
How to Set Time, Date in Linux
To have the correct time and date in Linux is very important, a lot of things depends on it. It does not matter if you are using Linux to power your personal computer or you have a Linux server. The server and system clock needs to be on time. Linux check date from command line Output : Set time and date from the command line To display the current date and time #timedatectl
-
How to check Inode Usage
What is the inode? Inode is a data structure in a Unix-style filesystem that describes a file-system object such as a file or a directory. It may contain metadata information like file access time, permissions, etc. Each filesystem or partition has its own set of inodes. To uniquely identify a file, you need both the inode and the device partition information. If all the inodes in a filesystem are used up, the kernel can not create new files even when there is available free disk space. So, if you have ample free disk space but unable to create new files, check the inode usage for that partition. To get the…
-
Linux help command
Help command : On Unix-like operating system shells, the help command displays information about builtin commands. Help displays brief summaries of shell built-in commands. If PATTERN is specified, gives detailed help on all commands matching PATTERN, otherwise the list of help topics is printed. Syntax help [-dms] [PATTERN …] Options d – Output short description for each topic. Example : $help -d help help - Display information about builtin commands. m – Display usage in pseudo-manpage format. // using help with -m $help -m help NAME help - Display information about builtin commands. SYNOPSIS help [-dms] [pattern ...] DESCRIPTION Display information about built-in commands. s – Output only a short…
-
How to change file permissions in linux
Linux File Permissions Every file and directory on your Unix/Linux system is assigned 3 types of owner, given below. Owner is the usually the creator of the files/folders. In Linux, files or folders that you created in your Home directory are usually owned by you, unless you specifically change the ownership. Group contains a group of users who share the same permissions and user privilege. Others means the general public. Identities u — the user who owns the file (that is, the owner) g — the group to which the user belongs o — others (not the owner or the owner’s group) a — everyone or all (u, g, and…
-
BASIC COMMANDS IN LINUX
This is introduction to some common Linux commands is for you. These commands are the ones that Linux system administrators use frequently # ls – lists directory contents The ls command – the list command – functions in the Linux Terminal to show all of the major directories filed under a given file system. For example, the command: $ ls /etc The ls command is used for viewing files, folders and directories. in the path. #cd – changes directory The cd command – change directory – will allow the user to change between file directories. As the name command name suggest, you would use the cd command to circulate between two different directories. For…




















