Category Archives: General Commands
Iptables Firewall Basics
This article is aimed at providing the basics to using iptables as a fire wall for your personal home or production server, we won’t be covering every thing here but what we will be covering will give you enough information to demystify their man pages and get you going. Firstly, the firewall and how it [...]
Create an ISO Image File from a CD or DVD
To create an exact image of a cd or dvd, you are able to use the dd command. If your disk is mounted at /mnt/disk, you can use this command to make an image file named disk.iso. dd if=/mnt/disk of=/home/disk.iso In that command, dd is the program that is used, if is the input file, [...]
Create and Remove Directories
To create a directory in Linux, you will use the mkdir command with the name of the directory that your want to create. mkdir foldername To delete an empty directory, you can use the rmdir command with the path to the folder that you want to remove. rmdir foldername If the folder is not empty [...]
Extract a tar and a tar.gz file
To extract a tar file named file.tar, you can use the following command. root@server [~]#tar -xvf file.tar In that, the x is the part that extracts, f defines the file and v gives verbose output, telling you what is being extracted. To extract a file that is named file.tar.gz, you will use the z flag [...]
Getting your kernel information
You can check the kernel information as well as a few other things using the uname command. Using just uname alone will usually just show you that you are using the Linux kernel. [root@server ~]# uname Linux To see just the kernel release, you can use the -r flag. [root@server ~]# uname -r 2.6.18-194.26.1.el5.028stab079.2 Then [...]
Using the calendar in the terminal
Linux has a the ability to show a full visual calendar from the terminal. If you just type in the “cal” command, you will show a visual of the current month, which will look something like this: user@server:~$ cal February 2011 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 [...]
Sorting Files By Date and Time
There is more than one way to display files that are sorted by date, but I prefer to use the ll command to list the files, then the r to list them in reverse order and the t flag to sort them by the time. So, we start out with a list of files such [...]
Check the running processes for a particular user
Sometimes when you check top and you notice that there is one user that is using a lot of resources, you may want to check for all the running processes for that user by using the following command: ps aux | grep username That will output the process and the path to the file that [...]
