Ask Me About Websites
Menu
  • What is a website?
  • Useful Linux Commands
    • Cheat Sheet of Useful Linux Commands
    • Add / Create New Sudo User
    • 10 Commands to find the processes in Linux
    • Working with Java Keystores
  • Magento Commands
  • Laravel
  • WordPress Tips and Hints
  • What is a website?
  • Useful Linux Commands
    • Cheat Sheet of Useful Linux Commands
    • Add / Create New Sudo User
    • 10 Commands to find the processes in Linux
    • Working with Java Keystores
  • Magento Commands
  • Laravel
  • WordPress Tips and Hints

Useful Linux Commands


Linux Quick Solutions

  • Add Java Home to a User
  • How to create a new sudo user and secure with SSH key
  • How to config Apache to 301 for HTTP to HTTPS
  • No space left on device – Could I be running out of Inodes?

Linux Commands

Command Description
uname -a kernal version
lsb_release -a Linux OS description
for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done show all crontabs for machine
passwd to change the password
grep -r word * Find word in files
grep -rin word * Find word in files not case sensitive & show line in file
find / -name ‘iptables.*’
ps -A | grep java Find all processes with name java
ps -ef | grep java Find all processes with name java (alternative)
find . -type f -exec chmod 664 {} \; Set All file permission
find . -type d -exec chmod 2775 {} \; Set All directory permission
chown -R www-data:www-data *.* Set All file & directory ownership
crontab -e Edit Crom Jobs
df -h Harddrive space status
du -h See size of directories and total at bottom
du -h –max-depth=1 | sort -hr See size of sub-directories and total at bottom
sudo netstat -tulpn | grep LISTEN See what ports are listening
mysqld restart Restart mysql
iptables -n -L -v –line-numbers IP tables with line numbers
iptables -A INPUT -p icmp -s 162.209.9.30 -j ACCEPT Add line to IP table for DB
iptables -D INPUT 4 Remove IP rule by number
rm -rf dirname Remove directory and all contents (add directory name at end)
usermod -a -G www-data james Add existing user to the www-data group
rm -rf mydir Delete all files without prompt in directory
find / -name ‘iptables.*’ -type f -delete Find all files with name like x and delete
rsync -auvtz -e “ssh -p 1853” username@xx.xx.xx.xx:/var/www/test/ /var/www/test/ Simple rsync command
scp /dir/file.txt username@xx.xx.xx.xx:/var/www/test/ SCP local source to destination remote
scp username@xx.xx.xx.xx:/var/www/test/ /local/www/test.txt SCP remote source TO local destination
tar -czvf archive.tar.gz /home/ubuntu –exclude=*.mp4 Simple zip command with exclude file by type
ssh-keygen -R hostname Remove errant record from known_host
find /var/log -name “*.log” -type f -mtime +30 -exec rm -f {} \; Find files with a .log extension older then 30 days and remove them

5 thoughts on “Useful Linux Commands”

  • Gerry says:
    January 10, 2017 at 3:17 am

    Generally I don’t read article on blogs, but I wish to say that this write-up very forced me to take a look at and do it! Your writing style has been amazed me. Thank you, quite great article.

    Reply
  • content says:
    August 9, 2017 at 6:42 pm

    I simply want to mention I’m new to blogging and truly liked your page. Probably I’m likely to bookmark your site . You actually come with really good articles. Kudos for sharing your blog.

    Reply
  • site:forobeta.com/mobidea Mobidea says:
    September 3, 2017 at 6:18 pm

    Thank you for sharing!

    Reply
  • check my site says:
    March 28, 2018 at 2:59 am

    I simply want to say I’m beginner to blogging and site-building and absolutely liked you’re blog. More than likely I’m likely to bookmark your website . You really have superb stories. With thanks for revealing your web site.

    Reply
  • Theron Cashing says:
    October 28, 2018 at 11:04 am

    WOW just what I was searchinglooking for. Came here by searching for keywordmeta_keyword

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts


  • Add Java Home to a User
  • How to create a new sudo user and secure with SSH key
  • How to config Apache to 301 for HTTP to HTTPS
  • Where do I find the YUI yahooapi serverd secure (https)
  • Fix to Saving Permalinks to fix 404’s

Recent Comments


  • Theron Cashing on Useful Linux Commands
  • check my site on Useful Linux Commands
  • site:forobeta.com/mobidea Mobidea on Useful Linux Commands
  • content on Useful Linux Commands
  • Gerry on Useful Linux Commands

Recent Posts

  • Add Java Home to a User
  • How to create a new sudo user and secure with SSH key
  • How to config Apache to 301 for HTTP to HTTPS
  • Where do I find the YUI yahooapi serverd secure (https)
  • Fix to Saving Permalinks to fix 404’s
  • No space left on device – Could I be running out of Inodes?
  • Simple MYSQL Script to change domain for WP
  • Simple debug setting for WordPress config

Tag Cloud

Pages

  • #552 (no title)
  • 10 Commands to find the processes in Linux
  • Add / Create a new user with SUDO privilegdes to Ubuntu (Linux)
  • Laravel Set Up and Commands Win10
  • Magento Commands
  • test of book
  • TEst of ninja JS
  • Test of WP Google Maps
  • Useful Linux Commands
  • What is a website?
  • WordPress Tips and Hints
  • Working with Java Keystores

Categories

  • Javascript
  • Linux Commands
  • Linux Solutions
  • Wordpress

Copyright © 2020 websidestores.com - askmeaboutwebsites

Theme created by PWT. Powered by WordPress.org