Here are a list of Linux / Ubuntu commands I use regularly so you may find them useful also, especially as a beginner to using Ubuntu.
I am currently running Ubuntu 11.10.
PUSHING A LOCAL FILE TO A REMOTE SERVER
scp file.zip username@hostname.com:/path/on/server/
CHMOD FILES UNDER A DIRECTORY TO 644 (-RW-R--R--)
sudo find /path/to/directory -type f -print0 | xargs -0 sudo chmod 644
CHMOD DIRECTORIES UNDER A DIRECTORY TO 755 (DRWXR-XR-X) (Includes Directory)
sudo find /path/to/directory -type d -print0 | xargs -0 sudo chmod 755
INSTALLING SOFTWARE
sudo apt-get install inkscape
LIST NETWORKING HARDWARE
sudo lshw -C network
lsmod
ifconfig -a
iwconfig
SOLVING SLOW INTERNET SPEED PROBLEM (Ubuntu 10 - 11)
(Where "iwl3945" is the wireless driver, found with sudo lshw -C network)
1. gksudo geany /etc/modprobe.d/iwl3945.conf
OR gksudo geany /etc/modprobe.d/iwl3945-disable11n.conf
2. options iwl3945 disable_hw_scan=0
OR options iwl3945 11n_disable=1
APACHE/MYSQL
sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/mysql start
sudo /etc/init.d/mysql stop
service mysql start
service mysql stop
SSH SECURE SHELL
ssh -l username hostname
LIST PROCESSES
ps -e
KILL A PROCESS
killall -9 appname/process name
SCHEDULED SHUTDOWN/RESTART (24 Hour Clock)
sudo shutdown -P HH:MM (SHUTDOWN at HH:MM)
sudo shutdown -r now (RESTART NOW)
SYNCING LOCAL TO REMOTE SERVER
rsync --progress --ignore-times --delete -rvz /path/to/local/folder/ username@hostname:/path/to/remote/folder/
SYNCING REMOTE TO LOCAL SERVER
rsync --progress --ignore-times --delete -rvz username@hostname:/path/to/remote/folder/ /path/to/local/folder/
COPYING A DIRECTORY
cp -r dir1 dir2
REMOVING A DIRECTORY
rm -rf directory
RENAMING A DIRECTORY
mv test hope
CREATING A FILE
touch new.file
cat > new.file
contents
Control + D to complete
UNZIP/UNRAR/UNTAR
unzip file.zip
unrar e file.rar
tar xvf something.tar
tar xvfz something.tar.gz
AVG ANTIVIRUS COMMANDS (Install Linux version first through www.avg.com)
avgcfgctl, avgctl, avgdiag.sh, avgdump, avgscan, avgspmctl, avgupdate, avgvvctl
I am currently running Ubuntu 11.10.
PUSHING A LOCAL FILE TO A REMOTE SERVER
scp file.zip username@hostname.com:/path/on/server/
CHMOD FILES UNDER A DIRECTORY TO 644 (-RW-R--R--)
sudo find /path/to/directory -type f -print0 | xargs -0 sudo chmod 644
CHMOD DIRECTORIES UNDER A DIRECTORY TO 755 (DRWXR-XR-X) (Includes Directory)
sudo find /path/to/directory -type d -print0 | xargs -0 sudo chmod 755
INSTALLING SOFTWARE
sudo apt-get install inkscape
LIST NETWORKING HARDWARE
sudo lshw -C network
lsmod
ifconfig -a
iwconfig
SOLVING SLOW INTERNET SPEED PROBLEM (Ubuntu 10 - 11)
(Where "iwl3945" is the wireless driver, found with sudo lshw -C network)
1. gksudo geany /etc/modprobe.d/iwl3945.conf
OR gksudo geany /etc/modprobe.d/iwl3945-disable11n.conf
2. options iwl3945 disable_hw_scan=0
OR options iwl3945 11n_disable=1
APACHE/MYSQL
sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/mysql start
sudo /etc/init.d/mysql stop
service mysql start
service mysql stop
SSH SECURE SHELL
ssh -l username hostname
LIST PROCESSES
ps -e
KILL A PROCESS
killall -9 appname/process name
SCHEDULED SHUTDOWN/RESTART (24 Hour Clock)
sudo shutdown -P HH:MM (SHUTDOWN at HH:MM)
sudo shutdown -r now (RESTART NOW)
SYNCING LOCAL TO REMOTE SERVER
rsync --progress --ignore-times --delete -rvz /path/to/local/folder/ username@hostname:/path/to/remote/folder/
SYNCING REMOTE TO LOCAL SERVER
rsync --progress --ignore-times --delete -rvz username@hostname:/path/to/remote/folder/ /path/to/local/folder/
COPYING A DIRECTORY
cp -r dir1 dir2
REMOVING A DIRECTORY
rm -rf directory
RENAMING A DIRECTORY
mv test hope
CREATING A FILE
touch new.file
cat > new.file
contents
Control + D to complete
UNZIP/UNRAR/UNTAR
unzip file.zip
unrar e file.rar
tar xvf something.tar
tar xvfz something.tar.gz
AVG ANTIVIRUS COMMANDS (Install Linux version first through www.avg.com)
avgcfgctl, avgctl, avgdiag.sh, avgdump, avgscan, avgspmctl, avgupdate, avgvvctl
No comments:
Post a Comment
Please leave your thoughts and comments!