Most Popular
1500 questions
60
votes
5 answers
How to understand the memory usage and load average in linux server
I am using a linux server which has 128GB of memory and 24 cores. I use top to see how much it is used. Its output is pasted at the end of the post. Here are two questions:
(1) I see that each of the running processes occupies a very small…
Tim
- 1,487
- 6
- 28
- 43
60
votes
4 answers
How to redirect root and only root via htaccess?
I want to redirect only my root to another url, but maintain all the /sub/directories where they belong (and redirect)
example:
mysite.com/1 redirects to somewhere
mysite.com/admin opens a page
i want mysite.com/ to redirect to mysecondsite.com and…
jardel
60
votes
7 answers
adding password to .ssh/config
I'm using ubuntu 12.04. I'm using ssh for connecting to many servers daily, so I put their parameters in .ssh/config file; like this :
Host server1
User tux
Port 2202
HostName xxx.x.xx.x
I know we should use key-pair ensure security, however…
Ajo Augustine
- 1,262
- 4
- 16
- 21
60
votes
2 answers
Where are the logs for ufw located on Ubuntu Server?
I have an Ubuntu server where I am blocking some IPs with ufw. I enabled logging, but I don't know where to find the logs. Where might the logs be or why might ufw not be logging?
blockhead
- 861
- 1
- 8
- 13
60
votes
11 answers
Why do I need to purchase an SSL certificate when I can generate one locally?
I am having trouble understanding why we need to purchase SSL certificates when we can generate them locally using openSSL. What is the difference between the certificate I purchase and a test certificate I generate locally? Is it just a big scam?
S-K'
- 1,301
- 3
- 11
- 15
60
votes
13 answers
How to know if a machine is an EC2 instance
I would like to run some scripts on hosts which are EC2 instances but I don't know how to be sure that the host is really an EC2 instance.
I have made some tests, but this is not sufficient:
Test that binary ec2_userdata is available (but this will…
Kelindil
- 733
- 1
- 5
- 7
60
votes
18 answers
Favorite rsync tips and tricks
The more I use rsync the more I realise that it's a swiss army knife of file transfer. There are so many options. I recently found out that you can go --remove-source-files and it'll delete a file from the source when it's been copied, which makes…
Amandasaurus
- 31,471
- 65
- 192
- 253
60
votes
6 answers
Ending company IT Admin relationship
We have been using a company to administer our (small office) IT infrastructure. We don't have complete records of what has been done or hasn't been done and don't know what we need to ask for in order to pick this up ourselves. Is there a good…
albiglan
- 1,033
- 8
- 11
60
votes
7 answers
How do I know I'm running inside a linux "screen" or not?
The "screen" refers to a program mentioned in How to reconnect to a disconnected ssh session . That is a good facility.
But there is a question I'd really like to know. How do I know whether I'm running inside a "screen"? The difference is:
If…
Jimm Chen
- 1,749
- 5
- 18
- 32
60
votes
7 answers
How to prevent "ps" reporting its own process?
$ ps | grep django
28006 ttys004 0:01.12 /usr/bin/python bin/django celeryd --beat
51393 ttys005 0:01.45 /usr/bin/python bin/django celeryd -l INFO
51472 ttys005 0:01.29 /usr/bin/python bin/django celeryd -l INFO
51510 ttys005 0:01.89…
Steve Bennett
- 5,750
- 12
- 47
- 59
60
votes
3 answers
How to: 1 Cron Job every ODD minutes and 1 other every EVEN minutes?
I have 2 cron jobs, i want one of them to run every odd minute (1,3,5,7,9,11....57,59)
and i want the other one to run every even minute (0,2,4,6,8,10,12...58)
how can i do it in an easy way? (no scripting - just cron job rules)
wabbajay
- 609
- 1
- 5
- 3
60
votes
2 answers
What Should be the Permissions of Apache SSL Directory, Certificate, and Key?
I have my cert.pem and cert.key files in /etc/apache2/ssl folders.
What would be the most secure permissions and ownership of:
/etc/apache2/ssl directory
/etc/apache2/ssl/cert.pem file
/etc/apache2/ssl/cert.key file
(Ensuring https:// access…
JP19
60
votes
5 answers
iptables port redirect not working for localhost
I want to redirect all traffic from port 443 to the internal port 8080. I'm using this config for iptables:
iptables -t nat -I PREROUTING --source 0/0 --destination 0/0 -p tcp \
--dport 443 -j REDIRECT --to-ports 8080
This works for all…
Chris
- 601
- 1
- 6
- 3
60
votes
6 answers
shutdown: What is difference between "Power Off" and "Halt"?
With your typical Linux shutdown command, what is the difference between halting the system and powering off the system?
Jake Wilson
- 8,814
- 29
- 97
- 125
60
votes
13 answers
How to monitor a windows log file in real time?
On windows how can I easily monitor a log file and see updates to the file in real time?
Basically, same functionality like tail -f log_file on Unix systems
Platform: Windows XP/2003/2008 server
[Update] this is quite handy for a quick…
dance2die
- 2,011
- 7
- 32
- 41