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
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
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
Install multiple software at the same time using apt-get
Answer:
It is easy to use apt-get to install multiple softwares at the same time, without executing commands one by one.
E.g.
# sudo apt-get install curl wget lynx elinks
Update the Package Index in Ubuntu
Answer:
In Ubuntu, the package index is managed by the Advanced Packaging Tool (APT).
The index of all the available packages from the repositories is defined in the file /etc/apt/sources.list file.
To update this package index, use the following command.
# sudo apt-get update
That is it.
Remove packages and config files in Ubuntu
Answer:
If you want to remove a package in Ubuntu, you can use apt-get remove, e.g.
# sudo apt-get remove php5
However, the config files will NOT be removed.
To remove the config files also, you can use apt-get purge, e.g.
# sudo apt-get purge php5
Check which Apache modules are loaded
Answer:
To check which Apache modules are loaded, in RHEL/Fedora/CentOS, type
# httpd -M
In Debian/Ubuntu
# sudo apache2ctl -M