yum Download All Source Packages (SRPM) From RedHat / CentOS WebSite

To download all source packages (SRPM) from RedHat or CentOS website using yum, you can use the yumdownloader command. Here’s an example command to download all source packages from the base repository of CentOS 7: yumdownloader –source –destdir=/path/to/download/directory –disablerepo=* –enablerepo=C7.0.1406-base * This will download all source packages from the base repository of CentOS 7 to … Read more

Linux / UNIX: Sed Replace Newline (\n) character

In sed, the newline character can be replaced with the \n escape sequence. To replace newlines in a file, use the following command: sed ‘:a;N;$!ba;s/\n/ /g’ inputfile > outputfile This command reads the entire input file into the pattern space, replaces newlines with spaces, and writes the result to the output file. Alternatively, to replace … Read more

Linux Load USB Driver

To load a USB driver on Linux, follow these steps: Plug in your USB device. Open a terminal window. Type the following command to check if your device has been detected by the system: $ dmesg | tail This will display the last few messages from the system log, which should include information about your … Read more

How To Upgrade FreeBSD 7.0 to 7.1 Stable Release

Upgrading a FreeBSD system from one release to another involves upgrading the base system files, the kernel, and the installed software packages. Here’s how to upgrade from FreeBSD 7.0 to 7.1: Update the ports tree and installed packages: # portsnap fetch update # pkg update Install the freebsd-update tool if it’s not already installed: # … Read more

Display Date And Time In Linux

To display the current date and time in Linux, you can use the date command. To display the date and time in the format Weekday Month Day HH:MM:SS Timezone Year, you can use the following command: date This will output the date and time in the format described above, for example: Fri Feb 19 15:45:30 … Read more

Linux Change Hostname

To change the hostname of a Linux system, you can follow these steps: Log in to the system with root or sudo access. Open the /etc/hostname file with a text editor such as nano or vi. sudo nano /etc/hostname In the file, replace the current hostname with the new hostname that you want to set. … Read more