Linux Masters of /g/
what Linux commands should everyone know?
>>51971586
exit
ssh -X [ip] to open remote GUIs
rm -rf / --no-preserve-root
troll
( seq 1 8 200 ; seq 6 8 200 ) | sort -n | xargs -I{} -n 1 dig +short -x 206.214.251.{}
>>51971658
only if X forwarding is enabled server side
who the fuck still uses X forwarding?
<command> | grep "<word im looking for>"
echo "butts" >> <filename>
babby here
>>51971889
grep -i ignores case by the way
also grep -v "inverts the search" (IE show things that do NOT meet the pattern)
also grep -e pattern -e pattern2 for OR searches
ls, cd, pwd, mv, exit, grep, locate, awk1, nano/vim2 and regex2.
1. Useful for filtering info alongside with grep. One can really benefit from some simple bash scripts.
2. Not really commands but useful.
>>51971930
neat, I use -i sometimes
>>51971933
vim is most definitely a command in the same way grep is, only vim is interactive
>>51971665
muh files!
>>51971930
Can't you use (one|two) with grep for OR?
ls -al
>>51971933
What does awk1 do?
>>51971586
sudo install gentoo
>>51971999
It's just awk, I messed up the subscript numbers. You can use for example:
awk '{print $2}'
It'll print every second column of every line. You can also print $1 $3 $6. Awk is a stream editor for many purposes.
>>51971993
>ls -al
ls -alp
always remember the -p flag as that will add a slash behind all directories so you know which names are files and which are directories
>>51971879
what do you use, faggot?
>>51971980
I think the difference is that grep -e compares to separate regexes, where as | combines two strings to a single regex. I think the only time there might be a difference would be with like really long regexes
ctrl-d closes the terminal so you dont have to type exit
ls -la | wc -l; du -ch | sed -n '$p'
shows how many files/folders and their total size
>>51972057
vnc
Isn't X forwarding incredibly insecure?
use 'history -c' after you've finished h4x0ring to make urself untraceable
>>51972092
If done through xhost, yes. You can use it over ssh in a separate session, which would not be insecure, but will not be connected to an already existing session.
>>51972160
>xhost
care to explain?
>>51972108
Sometimes I use it because I don't want person whom I share the user with know that I'm too retarded to use linux.
>>51971586
>filename
>confusing ubuntu with linux as a whole
>>51972239
>2k15
>sharing user accounts
...
if you have hundreds of files that you have to rename with the same pattern, its good to use rename
rename s/*xx.jpg/""/
I think that changes xx in all files that have xx to the empty string, I cant remember exactly
sort -u, sort | uniq, sed "s/old/new/"
>>51972108
useful if you enter a command with a password inline
>>51972239
bolshevists in full force on 4chan today
>>51972239
Does you first letter of first name start with B?
>>51972207
It disables X security. X works on a server/client fashion spawning a server for each client. The client can only connect using a special token file. You can use X on the target computer from a separate session through ssh. You can only access an already running session teamviewer-like by disabling X security.
killall [application]
man [command]
less [file, usually text]
Learn the basics of tar. You have to learn the utter basics of one terminal text editor that's included in most Linux distros (vi, nano, or others) in case anything goes weird.
Most other things are
* easily searchable online
* prominently included in every terminal tutorial
* too specific for truly general use
* or just not a big deal.
If you're looking for a certain filename, you can usefind <directory>, which you can then pipe into| grep file
ie.find / | grep \.cto find all .c files on the disk
tail -f logfile
Great for monitoring changes in a logfile as they happen
>>51972437
very good
>>51972437
Or you could just usefind <place> -name <thing>
e.g.,find / -name *.c
to find all .c files on disk.
>>51972513
add 2> /dev/null to remove all error output
>>51972360
Don't worry, I'm not.
>>51971586
Some sound effects to play with sox:
Pinknoise, to help you concentrate in noisy environments:play -c 2 -n synth pinknoise band -n 2500 4000 tremolo 0.03 5 reverb 20 gain
Ocean sound:play -n -n --combine merge synth pinknoise band -n 1200 1800 tremolo 50 10 tremolo 0.14 70 tremolo 0.2 50 gain -10
Enterprise ship background sound:play -n -c1 synth whitenoise lowpass -1 120 lowpass -1 120 lowpass -1 120 gain +14
ssh -XY <hostname>
scp
wget
>>51971586
press 'up' arrow to get the previous command.
Learn regular expressions and flags on basic commandsmv -i *.png /mnt/backup/pictures/
This would move all pngs from the current directory to that folder and prompt you incase of conflicting filenames before overwriting.