Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Compress and decompress file using 7zip

Answer:

7zip is a well known compression program if you need a very small file size, i.e. high compression ratio.

To install under Ubuntu/Debian:

# sudo apt-get install p7zip

To compress a file

# p7zip test.txt

To decompress a file

# p7zip -d test.txt.7z

Add a User in Linux

Answer:

Add a User in Linux, just use the useradd command:

# sudo useradd -d /home/john -m john

The above command will create the user john and create a home directory which is at /home/john

Remove default Debian/Ubuntu default Apache welcome page

Answer:

To remove the Apache default welcome page under Debian/Ubuntu,

1. Remove the welcome page configuration

# a2dissite default

2. Restart Apache

# sudo /etc/init.d/apache2 restart 

That's all.

How to check which mime types are supported by your Debian/Ubuntu

Answer:

The /etc/mime.types file is the system-wide rules which defined for mapping filename suffices to mime types. Your Apache on Debian based Linux will read this file and set the correct Content-type header for these files when serving to users.

# cat /etc/mime.types

Check Debian version information

Answer:

To check the Debian version information in Debian/Ubuntu

Try:

# cat /etc/debian_version
squeeze/sid