Flush DNS cache

This morning I was doing some work with one of my website transfer and to see the changes on my MacBook laptop I knew I would need to flush the DNS cache so I wouldn’t have to wait for the cache to expire. So for anyone else who needs to know the commands here they… Continue reading Flush DNS cache

Linux Configuration and Diagnostic Tools

untitled System and Network Configuration * linuxconf – A GUI interactive interface available on Redhat 6.0 or later which includes netconf configuration. * netconf – A GUI interactive interface available on Redhat 6.0 and later. * kbdconf – A Redhat Linux tool which configures the /etc/sysconfig/keyboard file which specifies the location of the keyboard map… Continue reading Linux Configuration and Diagnostic Tools

Give me the most current file

I needed a quick way to maintain a current symlink to the most recent file by time stamp. Here’s one way to do it: ls -t1 *.jpg | head -1 | xargs -i ln -sf {} current.jpg

#!/bin/bash

I think the number one skill a sysadmin should have is a solid understanding of shells and shell scripting. The Advanced Bash-Scripting Guide is a good place to start or take a refresher. From the introduction: A working knowledge of shell scripting is essential to anyone wishing to become reasonably proficient at system administration, even… Continue reading #!/bin/bash

Service/Daemon Management

restarting/stopping/starting a service On any init.d based linux distro you can restart a service with the following… /etc/init.d/serviceName restart You may replace ‘restart’ with ’stop’ or ’start’ (and in some cases ’status’). Forcefully stopping a service killall processName Killing on instance of a service kill pid The pid can be gathered by either top or… Continue reading Service/Daemon Management

Published
Categorized as Basics

User Management

useradd useradd userName then run “passwd userName” to set the new users pw passwd passwd username will ask for the new pw twice

Published
Categorized as Basics

File Permissions

Listing Permissions ls -al will display all files in a list with their owners and permissions -rw-r–r– 1 irq13 irq13 1006 Jan 24 10:16 .bashrc Now to break down the above example… -rw-r–r– is the permissions area. The first – would be d if the item is directory, otherwise it will be -. The second… Continue reading File Permissions

Published
Categorized as Basics

Additional command operators

ps | grep ssh — only display lines that contain ssh ; used to “stack commands” or issue multiple commands on 1 line. cd ..; ls & puts a command in the background. Will let you know when the command is finished > write what is displayed on the screen from a given command to… Continue reading Additional command operators

Published
Categorized as Basics